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

After GZIP compression these minified files vary in size:
cdnjs
  139326 bytes (136.1k)
CDN
unpkg
  138221 bytes (135.0k)
CDN
gzip -6 (default)
  137899 bytes (134.7k)
local copy
jsdelivr
  137781 bytes (134.6k)
CDN
gzip -9
  137435 bytes (134.2k)
local copy
7zip -mx=9 -tgzip
  132729 bytes (129.6k)
local copy
libdeflate -12
  132676 bytes (129.6k)
local copy
zultra
  132540 bytes (129.4k)
local copy
kzip -s0 -rn -b6
  132408 bytes (129.3k)
local copy
pigz -11 -n
  132353 bytes (129.3k)
local copy
Zopfli
  132256 bytes (129.2k)
local copy
Zopfli (defluff)
  132251 bytes (129.2k)
local copy

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

You will automatically get the smallest ThreeJS 96 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 5525 bytes by using my ThreeJS 96 Zopfli version instead of the best available CDN (4.18% smaller than jsdelivr, 132256 vs. 137781 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 --mls4096 --bsr9 --lazy --ohh

(found September 2, 2018)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 4096  --mls4096
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 5 more bytes (132251 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/r96/build/three.min.js --location | md5sum
6688fe8b1dca184cc16d0833cd5fb78c  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r96.min.zopfli.js.gz | md5sum
6688fe8b1dca184cc16d0833cd5fb78c  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
cdnjs 139326 bytes 6688fe8b1dca184cc16d0833cd5fb78c (invalid)
unpkg 138221 bytes 6688fe8b1dca184cc16d0833cd5fb78c (invalid)
jsdelivr 137781 bytes 6688fe8b1dca184cc16d0833cd5fb78c August 31, 2018 @ 19:02

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
132256 bytes -3 bytes zopfli --i1000000 --mls4096 --bsr9 --lazy --ohh September 2, 2018 @ 17:43
132259 bytes -6 bytes zopfli --i100000 --mls4096 --bsr9 --lazy --ohh September 1, 2018 @ 12:21
132265 bytes -1 byte zopfli --i10000 --mls4096 --bsr9 --lazy --ohh September 1, 2018 @ 01:27
132266 bytes -3 bytes zopfli --i10000 --mls4096 --bsr23 --lazy --ohh September 1, 2018 @ 01:26
132269 bytes -5 bytes zopfli --i10000 --mls4096 --bsr13 --lazy --ohh September 1, 2018 @ 00:30
132274 bytes -20 bytes zopfli --i1000 --mls4096 --bsr23 --lazy --ohh August 31, 2018 @ 19:28
132294 bytes zopfli --i100 --mls4096 --bsr23 --lazy --ohh August 31, 2018 @ 19:11

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
132431 132557 132407 132402 132497 132550 132501 132360 132388 132508 132428 132355 132352 132358 132471
132555 132559 132483 132552 132546 132397 132396 132404 132401 132413 132415 132471 132458 132377 132544
132496 132409 132403 132491 132365 132500 132382 132496 132367 132379 132315 132459 132510 132502 132541
132491 132481 132500 132489 132495 132483 132506 132499 132618 132366 132387 132310 132369 132529 132503
132494 132332 132336 132337 132498 132472 132500 132485 132488 132364 132506 132307 132363 132497 132524
132328 132339 132339 132361 132539 132359 132405 132508 132366 132360 132497 132256 132375 132503 132473
132331 132334 132326 132491 132492 132317 132494 132333 132515 132368 132494 132298 132361 132525 132528
132474 132510 132501 132495 132512 132483 132518 132519 132461 132357 132389 132298 132372 132527 132522
132485 132490 132500 132497 132492 132479 132488 132495 132494 132359 132393 132312 132362 132499 132550
132496 132494 132495 132494 132491 132502 132494 132392 132497 132492 132305 132261 132502 132520 132543
132495 132491 132505 132470 132498 132504 132511 132498 132501 132359 132358 132362 132370 132360 132282
132486 132490 132494 132500 132498 132485 132490 132391 132493 132321 132501 132303 132374 132546 132467
132477 132492 132333 132449 132492 132446 132507 132386 132497 132359 132389 132296 132359 132361 132365
132507 132322 132347 132483 132528 132499 132516 132525 132507 132353 132495 132329 132357 132518 132333
132338 132344 132342 132336 132488 132482 132514 132387 132518 132350 132383 132313 132536 132519 132416
132324 132322 132500 132503 132488 132347 132537 132527 132367 132356 132360 132356 132366 132529 132511
132322 132506 132342 132504 132511 132481 132499 132386 132488 132337 132393 132304 132350 132360 132442
132491 132322 132323 132501 132526 132319 132488 132536 132505 132360 132294 132307 132360 132518 132432
132487 132490 132495 132491 132489 132487 132498 132388 132505 132364 132493 132299 132380 132531 132399
132480 132493 132505 132492 132521 132497 132492 132384 132495 132380 132494 132262 132374 132519 132468
132333 132329 132344 132331 132344 132478 132497 132517 132487 132365 132295 132313 132357 132520 132334
132321 132363 132325 132493 132333 132489 132497 132388 132341 132360 132296 132306 132358 132522 132415
132315 132335 132322 132487 132329 132489 132503 132530 132484 132360 132397 132456 132376 132499 132435

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 132294 bytes 100%
1,000 132274 bytes -20 bytes 100%
10,000 132265 bytes -9 bytes 100%
100,000 132259 bytes -6 bytes 0.87%
1,000,000 132256 bytes -3 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
132412 bytes +156 bytes (+0.12%) +4 bytes
132995 bytes +739 bytes (+0.56%) +587 bytes
132982 bytes +726 bytes (+0.55%) +574 bytes
132809 bytes +553 bytes (+0.42%) +401 bytes
132717 bytes +461 bytes (+0.35%) +309 bytes
132632 bytes +376 bytes (+0.28%) +224 bytes
132408 bytes +152 bytes (+0.11%)
132438 bytes +182 bytes (+0.14%) +30 bytes
132422 bytes +166 bytes (+0.13%) +14 bytes

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 88825 bytes -43431 bytes (-32.84%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 102367 bytes -29889 bytes (-22.60%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 106123 bytes -26133 bytes (-19.76%)
Brotli (Wikipedia) brotli brotli -q 11 112283 bytes -19973 bytes (-15.10%)
LZMA2 (Wikipedia) xz xz -9 113164 bytes -19092 bytes (-14.44%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 118076 bytes -14180 bytes (-10.72%)
Zstandard (Wikipedia) zstd zstd -19 119106 bytes -13150 bytes (-9.94%)

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.