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

After GZIP compression these minified files vary in size:
unpkg
  191802 bytes (187.3k)
CDN
Google
  157768 bytes (154.1k)
CDN
Boot
  157006 bytes (153.3k)
CDN
gzip -6 (default)
  156415 bytes (152.7k)
local copy
jsdelivr
  156401 bytes (152.7k)
CDN
gzip -9
  155872 bytes (152.2k)
local copy
libdeflate -12
  150675 bytes (147.1k)
local copy
7zip -mx=9 -tgzip
  150574 bytes (147.0k)
local copy
zultra
  150416 bytes (146.9k)
local copy
kzip -s0 -rn -b0
  150314 bytes (146.8k)
local copy
Zopfli
  150121 bytes (146.6k)
local copy
pigz -11 -n
  150068 bytes (146.6k)
local copy

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

You will automatically get the smallest ThreeJS 125 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 6280 bytes by using my ThreeJS 125 Zopfli version instead of the best available CDN (4.18% smaller than jsdelivr, 150121 vs. 156401 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 --mls512 --bsr6 --lazy --ohh

(found January 30, 2021)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 512  --mls512
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 4 more bytes (150117 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/r125/build/three.min.js --location | md5sum
9f3591c56e98a6b46f685e9840e5a5d5  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r125.min.zopfli.js.gz | md5sum
9f3591c56e98a6b46f685e9840e5a5d5  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 157006 bytes 9f3591c56e98a6b46f685e9840e5a5d5 (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
unpkg 191802 bytes d8a70a8d84994578edbb9c2182ee7d62 < !function(t,e){"object"==typeof exports&&"undefined"!=type [...]
> !function(t,e){"object"==typeof exports&&"undefined"!=type [...]
(invalid)
Google 157768 bytes 72925fa9e347137556643dc5dec520d3 > /**
> * @license
> *
> * The MIT License
> *
> * Copyright © 2010-2021 three.js authors
> *
> * Permission is hereby granted, free of charge, to any pe [...]
> * of this software and associated documentation files (th [...]
> * in the Software without restriction, including without [...]
[...]
February 9, 2021 @ 17:56
jsdelivr 156401 bytes d8a70a8d84994578edbb9c2182ee7d62 < !function(t,e){"object"==typeof exports&&"undefined"!=type [...]
> !function(t,e){"object"==typeof exports&&"undefined"!=type [...]
January 28, 2021 @ 13:25

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

Other Versions

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

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
150121 bytes -2 bytes zopfli --i1000000 --mls512 --bsr6 --lazy --ohh January 30, 2021 @ 07:14
150123 bytes -6 bytes zopfli --i100000 --mls512 --bsr6 --lazy --ohh January 28, 2021 @ 19:02
150129 bytes -13 bytes zopfli --i10000 --mls512 --bsr6 --lazy --ohh January 28, 2021 @ 15:12
150142 bytes -42 bytes zopfli --i1000 --mls512 --bsr6 --lazy --ohh January 28, 2021 @ 14:02
150184 bytes zopfli --i100 --mls512 --bsr6 --lazy --ohh January 28, 2021 @ 13:48

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

Most recent activity on February 9, 2021 @ 17:56.

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
150421 150426 150423 150442 150436 150371 150371 150365 150366 150396 150348 150312 150315 150259 150435
150456 150465 150457 150467 150438 150366 150356 150364 150384 150435 150408 150262 150272 150252 150265
150435 150272 150279 150415 150264 150411 150443 150356 150121 150410 150259 150273 150256 150273 150180
150447 150391 150400 150364 150433 150389 150396 150231 150242 150245 150250 150254 150250 150279 150268
150467 150486 150302 150361 150449 150420 150436 150251 150243 150273 150257 150278 150252 150282 150289
150410 150451 150438 150436 150430 150437 150433 150241 150407 150409 150250 150260 150404 150235 150266
150474 150261 150537 150403 150433 150460 150454 150414 150247 150428 150233 150290 150284 150266 150258
150408 150434 150427 150440 150438 150436 150433 150393 150238 150405 150255 150283 150401 150241 150236
150450 150262 150272 150437 150429 150275 150259 150249 150258 150247 150268 150253 150254 150258 150261
150436 150267 150313 150416 150429 150439 150443 150244 150241 150246 150239 150249 150243 150207 150240
150424 150440 150463 150441 150406 150409 150444 150248 150243 150255 150244 150260 150418 150268 150233
150256 150258 150263 150244 150431 150255 150483 150257 150241 150251 150261 150457 150425 150242 150467
150269 150260 150240 150252 150261 150262 150259 150241 150240 150257 150269 150273 150422 150270 150249
150243 150263 150260 150243 150270 150252 150243 150238 150240 150444 150272 150251 150249 150250 150234
150251 150251 150250 150256 150265 150249 150250 150241 150243 150254 150467 150260 150248 150250 150235
150253 150262 150256 150256 150428 150260 150235 150243 150266 150250 150454 150264 150220 150256 150255
150426 150264 150254 150445 150447 150444 150429 150242 150257 150250 150256 150251 150256 150262 150261
150424 150438 150442 150426 150443 150417 150410 150248 150241 150441 150275 150258 150272 150259 150251
150413 150435 150442 150445 150430 150412 150410 150281 150256 150417 150270 150253 150248 150282 150236
150260 150259 150478 150435 150428 150417 150412 150255 150259 150408 150266 150254 150258 150205 150233
150430 150266 150260 150266 150426 150459 150437 150232 150262 150447 150245 150274 150245 150268 150255
150425 150438 150444 150433 150434 150428 150435 150245 150260 150254 150223 150256 150425 150241 150270
150476 150314 150449 150425 150439 150429 150230 150245 150259 150451 150263 150287 150246 150269 150239

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 150184 bytes 100%
1,000 150142 bytes -42 bytes 100%
10,000 150129 bytes -13 bytes 100%
100,000 150123 bytes -6 bytes 0.58%
1,000,000 150121 bytes -2 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
150314 bytes +193 bytes (+0.13%)
150745 bytes +624 bytes (+0.42%) +431 bytes
150771 bytes +650 bytes (+0.43%) +457 bytes
150511 bytes +390 bytes (+0.26%) +197 bytes
150452 bytes +331 bytes (+0.22%) +138 bytes
150417 bytes +296 bytes (+0.20%) +103 bytes
150372 bytes +251 bytes (+0.17%) +58 bytes
150384 bytes +263 bytes (+0.18%) +70 bytes
150329 bytes +208 bytes (+0.14%) +15 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 101843 bytes -48278 bytes (-32.16%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 117085 bytes -33036 bytes (-22.01%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 121231 bytes -28890 bytes (-19.24%)
Brotli (Wikipedia) brotli brotli -q 11 127148 bytes -22973 bytes (-15.30%)
LZMA2 (Wikipedia) xz xz -9 127488 bytes -22633 bytes (-15.08%)
Zstandard (Wikipedia) zstd zstd -19 133890 bytes -16231 bytes (-10.81%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 135270 bytes -14851 bytes (-9.89%)

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.