Choose a version:
52% The original file has 1232933 bytes (1,204.0k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 636479 bytes (621.6k, 52%).

After GZIP compression these minified files vary in size:
unpkg
  192190 bytes (187.7k)
CDN
Boot
  157262 bytes (153.6k)
CDN
gzip -6 (default)
  156688 bytes (153.0k)
local copy
jsdelivr
  156647 bytes (153.0k)
CDN
gzip -9
  156192 bytes (152.5k)
local copy
libdeflate -12
  150801 bytes (147.3k)
local copy
7zip -mx=9 -tgzip
  150796 bytes (147.3k)
local copy
zultra
  150680 bytes (147.1k)
local copy
kzip -s0 -rn -b0
  150499 bytes (147.0k)
local copy
pigz -11 -n
  150418 bytes (146.9k)
local copy
Zopfli
  150363 bytes (146.8k)
local copy
Zopfli (defluff)
  150358 bytes (146.8k)
local copy

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

You will automatically get the smallest ThreeJS 126 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 6284 bytes by using my ThreeJS 126 Zopfli version instead of the best available CDN (4.18% smaller than jsdelivr, 150363 vs. 156647 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 --mls16384 --bsr6 --lazy --ohh

(found February 27, 2021)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 16384  --mls16384
block splitting recursion 6  --bsr6
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 (150358 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/r126/build/three.min.js --location | md5sum
d0f8fc110baf5c5d992911bb5dbd8f0b  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r126.min.zopfli.js.gz | md5sum
d0f8fc110baf5c5d992911bb5dbd8f0b  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 192190 bytes d0f8fc110baf5c5d992911bb5dbd8f0b (invalid)
Boot 157262 bytes d0f8fc110baf5c5d992911bb5dbd8f0b (invalid)
jsdelivr 156647 bytes d0f8fc110baf5c5d992911bb5dbd8f0b February 25, 2021 @ 15:02

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

Other Versions

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

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
150363 bytes -5 bytes zopfli --i1000000 --mls16384 --bsr6 --lazy --ohh February 27, 2021 @ 20:13
150368 bytes -6 bytes zopfli --i100000 --mls16384 --bsr6 --lazy --ohh February 25, 2021 @ 19:31
150374 bytes -10 bytes zopfli --i10000 --mls16384 --bsr6 --lazy --ohh February 25, 2021 @ 15:53
150384 bytes -35 bytes zopfli --i1000 --mls16384 --bsr6 --lazy --ohh February 25, 2021 @ 15:25
150419 bytes -2 bytes zopfli --i1000 --mls16384 --bsr22 --lazy --ohh February 25, 2021 @ 15:25
150421 bytes -17 bytes zopfli --i1000 --mls8192 --bsr19 --lazy --ohh February 25, 2021 @ 15:25
150438 bytes zopfli --i100 --mls16384 --bsr6 --lazy --ohh February 25, 2021 @ 15:05

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

Most recent activity on March 1, 2021 @ 11:44.

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
150658 150673 150625 150623 150609 150601 150599 150660 150676 150554 150530 150574 150535 150560 150594
150674 150564 150557 150555 150597 150603 150588 150608 150614 150620 150465 150599 150466 150415 150458
150588 150583 150580 150573 150462 150609 150675 150618 150478 150644 150514 150479 150413 150363 150447
150459 150455 150463 150456 150468 150663 150585 150565 150482 150470 150417 150454 150446 150457 150468
150657 150657 150665 150670 150650 150476 150470 150470 150467 150459 150500 150466 150415 150456 150448
150639 150653 150670 150646 150589 150447 150667 150462 150641 150610 150534 150487 150496 150405 150431
150659 150471 150700 150655 150588 150395 150433 150447 150462 150427 150466 150544 150524 150457 150462
150651 150460 150463 150668 150660 150481 150463 150458 150468 150459 150466 150463 150448 150454 150431
150459 150468 150463 150469 150475 150474 150458 150481 150479 150463 150454 150479 150451 150456 150430
150452 150454 150519 150596 150452 150458 150439 150449 150444 150463 150405 150459 150417 150416 150455
150443 150448 150465 150454 150628 150672 150661 150485 150478 150475 150448 150468 150450 150443 150428
150474 150462 150466 150468 150465 150481 150467 150477 150475 150478 150445 150446 150469 150427 150431
150480 150483 150476 150484 150466 150445 150444 150456 150445 150472 150443 150483 150436 150415 150428
150447 150451 150460 150449 150460 150454 150471 150457 150453 150449 150447 150485 150474 150441 150429
150468 150467 150472 150463 150460 150663 150446 150482 150472 150462 150588 150453 150459 150447 150428
150459 150466 150521 150461 150449 150665 150453 150455 150448 150448 150397 150467 150396 150440 150454
150464 150479 150457 150461 150466 150457 150474 150453 150452 150446 150439 150471 150467 150441 150431
150456 150478 150459 150470 150441 150484 150463 150471 150482 150445 150406 150457 150440 150441 150431
150447 150454 150460 150449 150455 150473 150484 150455 150472 150475 150501 150482 150427 150407 150480
150457 150452 150458 150454 150460 150450 150452 150452 150449 150461 150447 150446 150440 150413 150475
150448 150464 150456 150459 150470 150464 150446 150484 150486 150444 150465 150467 150437 150456 150458
150451 150476 150463 150457 150465 150447 150445 150455 150449 150476 150505 150677 150412 150415 150429
150448 150456 150456 150463 150458 150444 150474 150454 150453 150443 150445 150487 150436 150415 150453

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 150438 bytes 100%
1,000 150384 bytes -54 bytes 100%
10,000 150374 bytes -10 bytes 100%
100,000 150368 bytes -6 bytes 0.87%
1,000,000 150363 bytes -5 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
150499 bytes +136 bytes (+0.09%)
150945 bytes +582 bytes (+0.39%) +446 bytes
150983 bytes +620 bytes (+0.41%) +484 bytes
150717 bytes +354 bytes (+0.24%) +218 bytes
150644 bytes +281 bytes (+0.19%) +145 bytes
150651 bytes +288 bytes (+0.19%) +152 bytes
150601 bytes +238 bytes (+0.16%) +102 bytes
150604 bytes +241 bytes (+0.16%) +105 bytes
150597 bytes +234 bytes (+0.16%) +98 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 - for example, your browser actually supports it !
Algorithm Program Parameters Size Compared To Best Zopfli
ZPAQ (Wikipedia) zpaq zpaq -method 69 101898 bytes -48465 bytes (-32.23%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 117177 bytes -33186 bytes (-22.07%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 121440 bytes -28923 bytes (-19.24%)
Brotli (Wikipedia) brotli brotli -q 11 127136 bytes -23227 bytes (-15.45%)
LZMA2 (Wikipedia) xz xz -9 127608 bytes -22755 bytes (-15.13%)
Zstandard (Wikipedia) zstd zstd -19 134096 bytes -16267 bytes (-10.82%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 135392 bytes -14971 bytes (-9.96%)

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 2021.
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.