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

After GZIP compression these minified files vary in size:
cdnjs
  134927 bytes (131.8k)
CDN
unpkg
  134927 bytes (131.8k)
CDN
gzip -6 (default)
  134662 bytes (131.5k)
local copy
jsdelivr
  134551 bytes (131.4k)
CDN
gzip -9
  134225 bytes (131.1k)
local copy
libdeflate -12
  129655 bytes (126.6k)
local copy
7zip -mx=9 -tgzip
  129643 bytes (126.6k)
local copy
zultra
  129439 bytes (126.4k)
local copy
kzip -s0 -rn -b8
  129265 bytes (126.2k)
local copy
pigz -11 -n
  129204 bytes (126.2k)
local copy
Zopfli
  129106 bytes (126.1k)
local copy
Zopfli (defluff)
  129102 bytes (126.1k)
local copy

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

You will automatically get the smallest ThreeJS 91 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 5445 bytes by using my ThreeJS 91 Zopfli version instead of the best available CDN (4.22% smaller than jsdelivr, 129106 vs. 134551 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 --bsr22 --lazy --ohh

(found March 16, 2018)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 4096  --mls4096
block splitting recursion 22  --bsr22
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 (129102 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/r91/build/three.min.js --location | md5sum
dbc882ea9757ed00f9c4bdbfaef851af  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r91.min.zopfli.js.gz | md5sum
dbc882ea9757ed00f9c4bdbfaef851af  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
cdnjs 134927 bytes dbc882ea9757ed00f9c4bdbfaef851af (invalid)
unpkg 134927 bytes dbc882ea9757ed00f9c4bdbfaef851af (invalid)
jsdelivr 134551 bytes dbc882ea9757ed00f9c4bdbfaef851af (invalid)

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
129106 bytes -5 bytes zopfli --i1000000 --mls4096 --bsr22 --lazy --ohh March 16, 2018 @ 19:22
129111 bytes -6 bytes zopfli --i100000 --mls4096 --bsr22 --lazy --ohh March 15, 2018 @ 16:26
129117 bytes -1 byte zopfli --i10000 --mls4096 --bsr22 --lazy --ohh March 15, 2018 @ 13:05
129118 bytes -12 bytes zopfli --i10000 --mls4096 --bsr18 --lazy --ohh March 15, 2018 @ 12:48
129130 bytes -20 bytes zopfli --i1000 --mls4096 --bsr18 --lazy --ohh March 15, 2018 @ 11:51
129150 bytes zopfli --i100 --mls4096 --bsr22 --lazy --ohh March 15, 2018 @ 11:25

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:50.

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
129311 129290 129379 129446 129438 129271 129242 129300 129226 129234 129212 129215 129208 129441 129188
129407 129407 129354 129395 129376 129353 129380 129159 129175 129401 129360 129146 129386 129253 129396
129374 129383 129358 129357 129364 129347 129373 129375 129374 129377 129310 129347 129238 129254 129239
129324 129331 129365 129370 129346 129352 129381 129338 129379 129328 129373 129120 129244 129261 129244
129330 129344 129345 129321 129351 129348 129242 129215 129373 129370 129189 129203 129387 129150 129339
129205 129324 129345 129371 129359 129322 129393 129143 129176 129378 129329 129334 129240 129248 129207
129223 129365 129353 129338 129312 129367 129365 129378 129373 129260 129145 129217 129377 129351 129336
129198 129200 129335 129318 129342 129362 129365 129158 129371 129360 129375 129351 129243 129199 129193
129365 129158 129337 129321 129337 129344 129373 129365 129374 129380 129365 129199 129370 129226 129185
129197 129185 129335 129335 129397 129340 129356 129161 129351 129377 129369 129216 129375 129397 129186
129312 129355 129334 129326 129350 129361 129247 129173 129300 129407 129348 129190 129245 129238 129250
129230 129319 129337 129331 129314 129369 129342 129359 129368 129222 129348 129245 129244 129209 129254
129312 129343 129338 129338 129329 129341 129341 129349 129350 129239 129188 129175 129239 129245 129213
129373 129370 129341 129346 129351 129358 129413 129358 129376 129395 129356 129221 129234 129187 129172
129348 129359 129341 129318 129330 129353 129405 129146 129354 129213 129328 129114 129137 129180 129319
129352 129365 129332 129336 129338 129332 129341 129173 129200 129362 129338 129375 129234 129393 129324
129329 129363 129336 129335 129349 129372 129368 129223 129145 129375 129363 129159 129370 129204 129409
129330 129144 129346 129358 129353 129349 129332 129348 129356 129362 129368 129355 129239 129368 129313
129358 129332 129336 129334 129332 129368 129376 129170 129168 129377 129355 129106 129241 129363 129317
129215 129210 129336 129334 129334 129366 129335 129364 129364 129365 129372 129188 129235 129392 129330
129218 129221 129169 129320 129319 129343 129358 129357 129221 129362 129350 129359 129240 129356 129345
129314 129160 129338 129355 129314 129356 129369 129173 129147 129363 129366 129162 129375 129395 129337
129223 129181 129340 129336 129348 129348 129344 129354 129355 129380 129368 129360 129239 129184 129336

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 129150 bytes 100%
1,000 129130 bytes -20 bytes 100%
10,000 129117 bytes -13 bytes 100%
100,000 129111 bytes -6 bytes 0.58%
1,000,000 129106 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
129301 bytes +195 bytes (+0.15%) +36 bytes
129850 bytes +744 bytes (+0.58%) +585 bytes
129848 bytes +742 bytes (+0.57%) +583 bytes
129651 bytes +545 bytes (+0.42%) +386 bytes
129571 bytes +465 bytes (+0.36%) +306 bytes
129474 bytes +368 bytes (+0.29%) +209 bytes
129426 bytes +320 bytes (+0.25%) +161 bytes
129306 bytes +200 bytes (+0.15%) +41 bytes
129265 bytes +159 bytes (+0.12%)

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 86778 bytes -42328 bytes (-32.79%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 99913 bytes -29193 bytes (-22.61%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 103759 bytes -25347 bytes (-19.63%)
Brotli (Wikipedia) brotli brotli -q 11 109696 bytes -19410 bytes (-15.03%)
LZMA2 (Wikipedia) xz xz -9 110540 bytes -18566 bytes (-14.38%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 114708 bytes -14398 bytes (-11.15%)
Zstandard (Wikipedia) zstd zstd -19 117012 bytes -12094 bytes (-9.37%)

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.