Choose a version:
50% The original file has 1235182 bytes (1,206.2k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 618895 bytes (604.4k, 50%).

After GZIP compression these minified files vary in size:
unpkg
  188101 bytes (183.7k)
CDN
gzip -6 (default)
  153649 bytes (150.0k)
local copy
jsdelivr
  153509 bytes (149.9k)
CDN
gzip -9
  153071 bytes (149.5k)
local copy
libdeflate -12
  147762 bytes (144.3k)
local copy
7zip -mx=9 -tgzip
  147606 bytes (144.1k)
local copy
zultra
  147491 bytes (144.0k)
local copy
Zopfli
  147240 bytes (143.8k)
local copy
kzip -s0 -rn -b0
  147194 bytes (143.7k)
local copy
pigz -11 -n
  147134 bytes (143.7k)
local copy

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

You will automatically get the smallest ThreeJS 116 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 6269 bytes by using my ThreeJS 116 Zopfli version instead of the best available CDN (4.26% smaller than jsdelivr, 147240 vs. 153509 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 --mls8192 --bsr19 --lazy --ohh

(found May 6, 2020)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 8192  --mls8192
block splitting recursion 19  --bsr19
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 (147236 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/r116/build/three.min.js --location | md5sum
8bb64bc30c5e7eff936a69a4fb9891db  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r116.min.zopfli.js.gz | md5sum
8bb64bc30c5e7eff936a69a4fb9891db  -

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

CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
unpkg 188101 bytes 3b7e928f3b88089bdc79ace3c944b063 < d.getError(),"35715",d.getProgramParameter(q,35715),"gl.ge [...]
< c=0;c<b;c++){var e=d.getActiveAttrib(q,c).name;a[e]=d.getA [...]
> d.getError(),"35715",d.getProgramParameter(q,35715),"gl.ge [...]
> {},b=d.getProgramParameter(q,35721),c=0;c<b;c++){var e=d.g [...]
(invalid)
jsdelivr 153509 bytes 3b7e928f3b88089bdc79ace3c944b063 < d.getError(),"35715",d.getProgramParameter(q,35715),"gl.ge [...]
< c=0;c<b;c++){var e=d.getActiveAttrib(q,c).name;a[e]=d.getA [...]
> d.getError(),"35715",d.getProgramParameter(q,35715),"gl.ge [...]
> {},b=d.getProgramParameter(q,35721),c=0;c<b;c++){var e=d.g [...]
May 4, 2020 @ 14:24

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
147240 bytes -3 bytes zopfli --i1000000 --mls8192 --bsr19 --lazy --ohh May 6, 2020 @ 18:09
147243 bytes -7 bytes zopfli --i100000 --mls8192 --bsr19 --lazy --ohh May 4, 2020 @ 19:06
147250 bytes -10 bytes zopfli --i10000 --mls8192 --bsr19 --lazy --ohh May 4, 2020 @ 15:52
147260 bytes -19 bytes zopfli --i1000 --mls8192 --bsr19 --lazy --ohh May 4, 2020 @ 14:59
147279 bytes -9 bytes zopfli --i1000 --mls128 --bsr7 --lazy --ohh May 4, 2020 @ 14:56
147288 bytes zopfli --i100 --mls8192 --bsr19 --lazy --ohh May 4, 2020 @ 14:39

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
147432 147418 147440 147476 147477 147453 147387 147441 147447 147406 147443 147444 147430 147427 147453
147357 147462 147352 147336 147347 147441 147441 147449 147356 147403 147405 147280 147379 147357 147380
147356 147389 147389 147356 147372 147324 147383 147309 147329 147331 147361 147364 147292 147343 147392
147340 147396 147394 147380 147357 147328 147261 147375 147332 147285 147329 147355 147358 147367 147335
147336 147337 147376 147401 147389 147341 147310 147376 147311 147321 147316 147307 147346 147368 147321
147335 147339 147375 147402 147404 147320 147322 147339 147301 147310 147325 147318 147369 147312 147338
147355 147409 147393 147403 147402 147366 147347 147354 147351 147338 147274 147372 147339 147326 147342
147318 147370 147369 147347 147392 147310 147337 147345 147396 147306 147380 147351 147366 147334 147328
147340 147378 147388 147379 147370 147378 147322 147339 147336 147332 147317 147385 147370 147314 147338
147324 147351 147327 147350 147367 147293 147324 147359 147317 147324 147323 147365 147338 147331 147305
147345 147378 147374 147404 147328 147315 147332 147360 147309 147287 147331 147308 147329 147338 147363
147339 147343 147343 147415 147385 147364 147410 147351 147378 147429 147278 147323 147330 147329 147334
147317 147378 147388 147413 147384 147322 147331 147329 147342 147336 147351 147371 147351 147315 147360
147415 147412 147380 147404 147395 147366 147291 147291 147368 147345 147364 147365 147328 147333 147336
147363 147388 147340 147322 147374 147331 147295 147357 147344 147342 147315 147370 147323 147336 147324
147336 147373 147368 147375 147370 147351 147338 147344 147347 147332 147312 147435 147240 147415 147337
147344 147351 147342 147350 147321 147332 147333 147334 147314 147344 147317 147316 147337 147339 147360
147342 147369 147376 147407 147329 147337 147321 147311 147303 147297 147312 147318 147329 147310 147334
147334 147392 147389 147396 147400 147354 147287 147297 147306 147303 147371 147339 147329 147311 147331
147335 147396 147390 147343 147393 147315 147321 147359 147312 147289 147309 147318 147326 147348 147289
147327 147339 147335 147402 147370 147366 147325 147328 147455 147349 147322 147387 147360 147334 147345
147336 147393 147374 147348 147394 147289 147324 147343 147352 147273 147320 147367 147332 147308 147320
147329 147365 147375 147405 147401 147350 147348 147339 147347 147283 147313 147351 147331 147316 147338

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 147288 bytes 100%
1,000 147260 bytes -28 bytes 100%
10,000 147250 bytes -10 bytes 100%
100,000 147243 bytes -7 bytes 0.58%
1,000,000 147240 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
147194 bytes -46 bytes (-0.03%)
147920 bytes +680 bytes (+0.46%) +726 bytes
147891 bytes +651 bytes (+0.44%) +697 bytes
147622 bytes +382 bytes (+0.26%) +428 bytes
147497 bytes +257 bytes (+0.17%) +303 bytes
147510 bytes +270 bytes (+0.18%) +316 bytes
147467 bytes +227 bytes (+0.15%) +273 bytes
147380 bytes +140 bytes (+0.10%) +186 bytes
147411 bytes +171 bytes (+0.12%) +217 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 98198 bytes -49042 bytes (-33.31%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 113775 bytes -33465 bytes (-22.73%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 119329 bytes -27911 bytes (-18.96%)
Brotli (Wikipedia) brotli brotli -q 11 124818 bytes -22422 bytes (-15.23%)
LZMA2 (Wikipedia) xz xz -9 125592 bytes -21648 bytes (-14.70%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 131026 bytes -16214 bytes (-11.01%)
Zstandard (Wikipedia) zstd zstd -19 131720 bytes -15520 bytes (-10.54%)

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.