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

After GZIP compression these minified files vary in size:
cdnjs
  139173 bytes (135.9k)
CDN
unpkg
  138014 bytes (134.8k)
CDN
gzip -6 (default)
  137639 bytes (134.4k)
local copy
jsdelivr
  137546 bytes (134.3k)
CDN
gzip -9
  137190 bytes (134.0k)
local copy
libdeflate -12
  132588 bytes (129.5k)
local copy
7zip -mx=9 -tgzip
  132508 bytes (129.4k)
local copy
zultra
  132364 bytes (129.3k)
local copy
kzip -s0 -rn -b6
  132219 bytes (129.1k)
local copy
pigz -11 -n
  132193 bytes (129.1k)
local copy
Zopfli
  132055 bytes (129.0k)
local copy
Zopfli (defluff)
  132052 bytes (129.0k)
local copy

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

You will automatically get the smallest ThreeJS 94 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 5491 bytes by using my ThreeJS 94 Zopfli version instead of the best available CDN (4.16% smaller than jsdelivr, 132055 vs. 137546 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 --bsr21 --lazy --ohh

(found June 30, 2018)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 4096  --mls4096
block splitting recursion 21  --bsr21
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 3 more bytes (132052 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/r94/build/three.min.js --location | md5sum
dfe8385c1102682808e14b0a3a94e81d  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r94.min.zopfli.js.gz | md5sum
dfe8385c1102682808e14b0a3a94e81d  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
cdnjs 139173 bytes dfe8385c1102682808e14b0a3a94e81d (invalid)
unpkg 138014 bytes dfe8385c1102682808e14b0a3a94e81d (invalid)
jsdelivr 137546 bytes dfe8385c1102682808e14b0a3a94e81d June 28, 2018 @ 13:03

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
132055 bytes -7 bytes zopfli --i1000000 --mls4096 --bsr21 --lazy --ohh June 30, 2018 @ 06:22
132062 bytes -2 bytes zopfli --i100000 --mls4096 --bsr21 --lazy --ohh June 28, 2018 @ 19:46
132064 bytes -4 bytes zopfli --i100000 --mls16384 --bsr15 --lazy --ohh June 28, 2018 @ 17:42
132068 bytes -1 byte zopfli --i10000 --mls4096 --bsr21 --lazy --ohh June 28, 2018 @ 16:13
132069 bytes -1 byte zopfli --i10000 --mls16384 --bsr15 --lazy --ohh June 28, 2018 @ 14:51
132070 bytes -9 bytes zopfli --i10000 --mls4096 --bsr22 --lazy --ohh June 28, 2018 @ 13:49
132079 bytes -2 bytes zopfli --i1000 --mls16384 --bsr13 --lazy --ohh June 28, 2018 @ 13:21
132081 bytes -3 bytes zopfli --i1000 --mls16384 --bsr15 --lazy --ohh June 28, 2018 @ 13:21
132084 bytes -2 bytes zopfli --i1000 --mls4096 --bsr21 --lazy --ohh June 28, 2018 @ 13:21
132086 bytes -13 bytes zopfli --i1000 --mls16384 --bsr17 --lazy --ohh June 28, 2018 @ 13:21
132099 bytes zopfli --i100 --mls4096 --bsr22 --lazy --ohh June 28, 2018 @ 13:09

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: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
132317 132204 132201 132201 132185 132381 132340 132265 132342 132336 132248 132321 132125 132145 132234
132336 132322 132325 132347 132384 132333 132373 132374 132376 132300 132288 132367 132191 132188 132391
132317 132317 132158 132321 132361 132271 132371 132160 132305 132216 132269 132344 132325 132284 132368
132149 132302 132197 132305 132311 132304 132352 132318 132308 132171 132138 132137 132327 132324 132359
132142 132307 132148 132306 132433 132132 132321 132330 132327 132177 132346 132096 132187 132281 132120
132153 132147 132145 132149 132320 132150 132350 132137 132358 132283 132269 132268 132171 132188 132364
132155 132146 132321 132314 132147 132141 132319 132345 132309 132275 132314 132103 132183 132280 132167
132306 132265 132307 132309 132320 132331 132318 132331 132134 132269 132112 132098 132162 132106 132160
132298 132299 132316 132304 132324 132438 132294 132312 132311 132348 132348 132097 132327 132075 132120
132312 132300 132148 132302 132325 132435 132314 132270 132298 132266 132096 132070 132174 132071 132144
132305 132315 132301 132307 132303 132315 132328 132357 132323 132182 132344 132348 132160 132214 132152
132312 132299 132136 132327 132324 132316 132335 132344 132301 132271 132087 132098 132297 132064 132130
132136 132300 132301 132303 132301 132315 132317 132328 132294 132342 132139 132344 132157 132212 132168
132298 132300 132301 132321 132305 132300 132324 132307 132310 132140 132136 132166 132280 132071 132260
132133 132147 132147 132141 132325 132321 132343 132349 132329 132322 132139 132139 132168 132187 132107
132147 132128 132319 132338 132328 132332 132325 132324 132326 132141 132136 132143 132345 132186 132161
132145 132145 132149 132137 132307 132311 132334 132335 132333 132337 132345 132184 132170 132141 132119
132137 132147 132145 132148 132323 132311 132316 132346 132307 132339 132102 132055 132200 132102 132105
132311 132299 132299 132335 132316 132330 132323 132321 132305 132077 132344 132070 132150 132271 132163
132143 132301 132325 132330 132325 132319 132320 132323 132306 132266 132074 132070 132174 132271 132272
132139 132157 132155 132304 132141 132294 132317 132346 132305 132077 132102 132073 132325 132082 132267
132151 132143 132144 132326 132325 132332 132323 132330 132301 132260 132262 132139 132182 132104 132104
132153 132160 132150 132150 132328 132314 132333 132330 132315 132323 132264 132263 132175 132267 132167

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 132099 bytes 100%
1,000 132079 bytes -20 bytes 100%
10,000 132068 bytes -11 bytes 100%
100,000 132062 bytes -6 bytes 0.58%
1,000,000 132055 bytes -7 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
132260 bytes +205 bytes (+0.16%) +41 bytes
132776 bytes +721 bytes (+0.55%) +557 bytes
132782 bytes +727 bytes (+0.55%) +563 bytes
132631 bytes +576 bytes (+0.44%) +412 bytes
132548 bytes +493 bytes (+0.37%) +329 bytes
132375 bytes +320 bytes (+0.24%) +156 bytes
132219 bytes +164 bytes (+0.12%)
132219 bytes +164 bytes (+0.12%)
132231 bytes +176 bytes (+0.13%) +12 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 88668 bytes -43387 bytes (-32.86%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 102070 bytes -29985 bytes (-22.71%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 105815 bytes -26240 bytes (-19.87%)
Brotli (Wikipedia) brotli brotli -q 11 111991 bytes -20064 bytes (-15.19%)
LZMA2 (Wikipedia) xz xz -9 112820 bytes -19235 bytes (-14.57%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 117262 bytes -14793 bytes (-11.20%)
Zstandard (Wikipedia) zstd zstd -19 119299 bytes -12756 bytes (-9.66%)

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.