Choose a version:
49% The original file has 1039889 bytes (1,015.5k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 507361 bytes (495.5k, 49%).

After GZIP compression these minified files vary in size:
cdnjs
  130942 bytes (127.9k)
CDN
unpkg
  129745 bytes (126.7k)
CDN
gzip -6 (default)
  129599 bytes (126.6k)
local copy
jsdelivr
  129514 bytes (126.5k)
CDN
gzip -9
  129182 bytes (126.2k)
local copy
libdeflate -12
  124758 bytes (121.8k)
local copy
7zip -mx=9 -tgzip
  124645 bytes (121.7k)
local copy
zultra
  124522 bytes (121.6k)
local copy
kzip -s0 -rn -b8
  124397 bytes (121.5k)
local copy
pigz -11 -n
  124397 bytes (121.5k)
local copy
Zopfli
  124188 bytes (121.3k)
local copy
Zopfli (defluff)
  124181 bytes (121.3k)
local copy

perma-link to the smallest file on my server:
http://minime.stephan-brumme.com/files/threejs/three-r86.min.js (or via HTTPS)

You will automatically get the smallest ThreeJS 86 file, ETag caching is available and
if your browser doesn't support GZIP decompression then the uncompressed version will be sent.

Currently best Zopfli settings

Save 5326 bytes by using my ThreeJS 86 Zopfli version instead of the best available CDN (4.29% smaller than jsdelivr, 124188 vs. 129514 bytes):
You can use my super-compressed files for whatever purpose you like as long as you respect the library's original license agreement.
There are no restrictions from my side - but please avoid hot-linking if you run a high-traffic website.

These command-line settings yielded the best compression ratio so far (Linux version of zopfli-krzymod):
zopfli --i1000000 --mb8 --mls2048 --bsr9 --lazy --ohh

(found July 8, 2017)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 2048  --mls2048
block splitting recursion 9  --bsr9
lazy matching in LZ77 yes  --lazy
optimized Huffman headers yes  --ohh
initial random W for iterations 1  --rw1
initial random Z for iterations 2  --rz2

Even Smaller Files Thanks To Defluff

Zopfli's output can be further optimized by the defluff tool.
In this particular case, defluff saves 7 more bytes (124181 bytes).

Verify file integrity

After decompression, my uncompressed files are identical to the original ones:

MD5:
curl --silent --compressed https://raw.githubusercontent.com/mrdoob/three.js/r86/build/three.min.js --location | md5sum
8d27c7b809c3f79a5ea3a0d99d17fcca  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r86.min.zopfli.js.gz | md5sum
8d27c7b809c3f79a5ea3a0d99d17fcca  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/mrdoob/three.js/r86/build/three.min.js --location | sha1sum
11dc9423dfd5bd0e0572623694194300cb8ecb71  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r86.min.zopfli.js.gz | sha1sum
11dc9423dfd5bd0e0572623694194300cb8ecb71  -

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
cdnjs 130942 bytes 8d27c7b809c3f79a5ea3a0d99d17fcca (invalid)
unpkg 129745 bytes 8d27c7b809c3f79a5ea3a0d99d17fcca (invalid)
jsdelivr 129514 bytes 8d27c7b809c3f79a5ea3a0d99d17fcca November 9, 2017 @ 11:40

Note: only the MD5 hashes are shown to keep things simple.

Other Versions

Available ThreeJS versions at minime.stephan-brumme.com:

148, 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50

The project site contains an overview how well these versions were compressed.
Other interesting projects are AngularJS, BackboneJS, Bootstrap, D3, Dojo, Ember, jQuery, Knockout, lodash, React, Socket.IO, UnderscoreJS and Vue.

Changelog

Best Zopfli parameters so far:
Size Improvement Parameters Found
124188 bytes -7 bytes zopfli --i1000000 --mls2048 --bsr9 --lazy --ohh July 8, 2017 @ 14:20
124195 bytes -5 bytes zopfli --i100000 --mls2048 --bsr9 --lazy --ohh June 21, 2017 @ 16:06
124200 bytes -5 bytes zopfli --i10000 --mls2048 --bsr9 --lazy --ohh June 21, 2017 @ 13:37
124205 bytes -12 bytes zopfli --i1000 --mls2048 --bsr9 --lazy --ohh June 21, 2017 @ 13:19
124217 bytes -18 bytes zopfli --i1000 --mls2048 --bsr25 --lazy --ohh June 21, 2017 @ 13:16
124235 bytes zopfli --i100 --mls2048 --bsr9 --lazy --ohh June 21, 2017 @ 13:02

If there are multiple parameter sets yielding the same compressed size, only the first one found is shown.

Most recent activity on July 20, 2020 @ 12:52.

Heatmaps

This Zopfli heatmap visualizes how compression changes when modifying the --bsr and --mls parameter.
Cell's contents is the best filesize achieved (in bytes, hover with mouse over cells to see number of iterations).

Good parameters are green, bad are red. The best and worst are bold as well.
The brightness of the blue background color indicates how many iterations were processed:
10,000, 100,000 or 1,000,000.
bsr \ mls
2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768
bsr \ mls
2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768
124401 124490 124428 124497 124404 124354 124450 124654 124446 124384 124389 124406 124400 124442 124422
124348 124361 124383 124395 124327 124404 124356 124401 124367 124386 124356 124352 124332 124364 124363
124420 124363 124371 124382 124365 124412 124395 124401 124335 124339 124381 124356 124351 124358 124366
124433 124328 124354 124422 124395 124426 124348 124361 124363 124362 124350 124353 124348 124370 124368
124401 124410 124399 124417 124404 124408 124397 124363 124336 124359 124325 124430 124368 124366 124357
124334 124397 124363 124399 124390 124397 124390 124395 124325 124324 124188 124350 124360 124358 124381
124447 124380 124448 124392 124397 124396 124394 124390 124388 124355 124212 124369 124357 124387 124385
124387 124395 124393 124327 124330 124328 124403 124397 124393 124343 124321 124321 124324 124345 124348
124375 124378 124361 124392 124346 124395 124393 124366 124352 124324 124215 124204 124362 124324 124359
124331 124330 124394 124391 124392 124396 124395 124397 124395 124320 124219 124353 124359 124343 124356
124333 124329 124399 124400 124397 124399 124392 124359 124360 124332 124216 124326 124367 124324 124354
124332 124374 124394 124392 124395 124389 124350 124368 124364 124349 124313 124349 124357 124345 124354
124405 124381 124394 124390 124391 124393 124406 124363 124359 124354 124317 124351 124366 124334 124361
124409 124406 124407 124383 124328 124399 124393 124396 124357 124348 124343 124345 124340 124384 124345
124406 124386 124386 124385 124390 124396 124393 124397 124398 124324 124320 124326 124364 124386 124352
124355 124402 124401 124333 124421 124401 124349 124348 124349 124323 124325 124324 124342 124326 124355
124339 124388 124360 124334 124384 124397 124392 124361 124345 124348 124213 124325 124359 124349 124353
124401 124398 124397 124392 124391 124399 124393 124400 124368 124320 124211 124324 124345 124326 124352
124388 124332 124392 124396 124391 124392 124395 124394 124394 124321 124241 124351 124337 124324 124356
124396 124391 124369 124390 124388 124357 124359 124363 124357 124321 124321 124348 124353 124324 124351
124385 124324 124391 124395 124393 124394 124392 124366 124348 124327 124211 124320 124350 124361 124358
124443 124325 124390 124392 124397 124392 124393 124369 124361 124324 124244 124354 124346 124328 124352
124382 124381 124441 124380 124398 124393 124392 124389 124343 124320 124217 124325 124353 124345 124349

Due to the Monte Carlo design of my search algorithm, not all parameters have reached the same number of iterations yet:
Iterations Min. Bytes Reduction Coverage
100 124235 bytes 100%
1,000 124205 bytes -30 bytes 100%
10,000 124200 bytes -5 bytes 100%
100,000 124195 bytes -5 bytes 0.58%
1,000,000 124188 bytes -7 bytes 0.29%
10,000,000

KZIP has far less options available for tuning/optimization. I only played around with the number of blocks (parameter -n):
Blocks Min. Bytes Compared To Best Zopfli Compared To Best KZIP
124411 bytes +223 bytes (+0.18%) +14 bytes
124887 bytes +699 bytes (+0.56%) +490 bytes
124890 bytes +702 bytes (+0.57%) +493 bytes
124658 bytes +470 bytes (+0.38%) +261 bytes
124575 bytes +387 bytes (+0.31%) +178 bytes
124482 bytes +294 bytes (+0.24%) +85 bytes
124496 bytes +308 bytes (+0.25%) +99 bytes
124416 bytes +228 bytes (+0.18%) +19 bytes
124397 bytes +209 bytes (+0.17%)

Non-DEFLATE Algorithms

Archivers based on completely different compression algorithms often produce superior results.
Unfortunately, browsers only support gzip compression at the moment.
However, support for Brotli is constantly growing - but your browser doesn't support it.
Algorithm Program Parameters Size Compared To Best Zopfli
ZPAQ (Wikipedia) zpaq zpaq -method 69 84367 bytes -39821 bytes (-32.07%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 96978 bytes -27210 bytes (-21.91%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 102757 bytes -21431 bytes (-17.26%)
Brotli (Wikipedia) brotli brotli -q 11 106355 bytes -17833 bytes (-14.36%)
LZMA2 (Wikipedia) xz xz -9 107136 bytes -17052 bytes (-13.73%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 111362 bytes -12826 bytes (-10.33%)
Zstandard (Wikipedia) zstd zstd -19 113220 bytes -10968 bytes (-8.83%)

Detailled Analysis

I wrote a DEFLATE decoder in Javascript. Click the button below to start a client-side analysis of the smallest gzipped files (may take a second):


Notes: pigz is a fast open source multi-threaded implementation of gzip written by one of the original authors of gzip.
However, when using compression level 11, pigz actually switches to the slower Zopfli algorithm and isn't multi-threaded anymore.
KrzyMOD's extensions to Zopfli offer the highest level of configuration and is therefore used for my brute-force search.
Ken Silverman wrote the closed-source KZIP compression program and Jonathon Fowler ported it to Linux.
Defluff was created by Joachim Henke; DeflOpt is a tool by Ben Jos Walbeehm.

website made by Stephan Brumme in 2015 and still improving in 2024.
all timestamps are displayed in central european time. see my changelog.
no flash, not even images or external css files - and everything squeezed into a single html file.
which was handsomely compressed before releasing it into the wild internet - obviously.

please visit my homepage and my blog, too.
email: minime (at) stephan-brumme.com

All trademarks are property of their respective owners. You know, the boring legal stuff.