Choose a version:
52% The original file has 807827 bytes (788.9k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 419938 bytes (410.1k, 52%).

After GZIP compression these minified files vary in size:
Boot
  121921 bytes (119.1k)
CDN
cdnjs
  101345 bytes (99.0k)
CDN
unpkg
  101205 bytes (98.8k)
CDN
gzip -6 (default)
  100408 bytes (98.1k)
local copy
Google
  100336 bytes (98.0k)
CDN
gzip -9
  99977 bytes (97.6k)
local copy
jsdelivr
  99942 bytes (97.6k)
CDN
libdeflate -12
  96536 bytes (94.3k)
local copy
zultra
  96464 bytes (94.2k)
local copy
7zip -mx=9 -tgzip
  96442 bytes (94.2k)
local copy
kzip -s0 -rn -b0
  96152 bytes (93.9k)
local copy
pigz -11 -n
  96150 bytes (93.9k)
local copy
Zopfli
  96110 bytes (93.9k)
local copy
Zopfli (defluff)
  96107 bytes (93.9k)
local copy

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

You will automatically get the smallest ThreeJS 71 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 3832 bytes by using my ThreeJS 71 Zopfli version instead of the best available CDN (3.99% smaller than jsdelivr, 96110 vs. 99942 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 --mls128 --bsr22 --lazy --ohh

(found January 28, 2017)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 128  --mls128
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 3 more bytes (96107 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/r71/build/three.min.js --location | md5sum
dc74fdfec0aab5ad75af6b99e2c37cb0  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r71.min.zopfli.js.gz | md5sum
dc74fdfec0aab5ad75af6b99e2c37cb0  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 121921 bytes dc74fdfec0aab5ad75af6b99e2c37cb0 (invalid)
cdnjs 101345 bytes dc74fdfec0aab5ad75af6b99e2c37cb0 (invalid)
Google 100336 bytes dc74fdfec0aab5ad75af6b99e2c37cb0 (invalid)
jsdelivr 99942 bytes dc74fdfec0aab5ad75af6b99e2c37cb0 (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
unpkg 101205 bytes 81ee8179d8385d170e53501c22488a8c < // threejs.org/license
> var self = self || {};// threejs.org/license
>
> // Export the THREE object for **Node.js**, with
> // backwards-compatibility for the old `require()` API. If [...]
> // the browser, add `_` as a global object via a string id [...]
> // for Closure Compiler "advanced" mode.
> if (typeof exports !== 'undefined') {
> if (typeof module !== 'undefined' && module.exports) {
> exports = module.exports = THREE;
[...]
July 11, 2016 @ 15:49

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
96110 bytes -5 bytes zopfli --i1000000 --mls128 --bsr22 --lazy --ohh January 28, 2017 @ 13:05
96115 bytes -4 bytes zopfli --i100000 --mls128 --bsr22 --lazy --ohh March 5, 2016 @ 12:31
96119 bytes -6 bytes zopfli --i100000 --mls16 --bsr19 --lazy --ohh December 29, 2015 @ 16:08
96125 bytes -4 bytes zopfli --i10000 --mls16 --bsr19 --lazy --ohh November 14, 2015 @ 08:46
96129 bytes -4 bytes zopfli --i1000 --mls16 --bsr19 --lazy --ohh November 14, 2015 @ 05:01
96133 bytes -1 byte zopfli --i10000 --mls1024 --bsr25 --lazy --ohh November 14, 2015 @ 01:48
96134 bytes -7 bytes zopfli --i10000 --mls128 --bsr16 --lazy --ohh November 14, 2015 @ 01:28
96141 bytes -15 bytes zopfli --i1000 --mls128 --bsr16 --lazy --ohh November 14, 2015 @ 01:10
96156 bytes -9 bytes zopfli --i1000 --mls8192 --bsr20 --lazy --ohh November 14, 2015 @ 01:05
96165 bytes zopfli --i100 --mls128 --bsr7 --lazy --ohh November 14, 2015 @ 00:56

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
96201 96214 96244 96206 96358 96202 96194 96165 96196 96261 96250 96225 96169 96289 96350
96222 96206 96212 96148 96186 96202 96138 96167 96196 96154 96153 96226 96159 96213 96189
96215 96196 96189 96268 96197 96268 96138 96201 96189 96186 96151 96159 96156 96147 96182
96213 96151 96203 96141 96178 96162 96131 96208 96132 96174 96160 96214 96145 96163 96169
96141 96157 96311 96134 96169 96187 96133 96142 96137 96140 96137 96141 96143 96160 96189
96206 96142 96187 96206 96210 96209 96171 96124 96153 96150 96141 96165 96144 96178 96166
96154 96207 96272 96291 96291 96289 96271 96150 96153 96150 96145 96219 96151 96147 96134
96220 96213 96139 96133 96141 96173 96130 96130 96165 96134 96156 96169 96140 96158 96161
96200 96202 96134 96316 96183 96175 96137 96133 96131 96136 96133 96212 96142 96179 96166
96143 96194 96134 96180 96187 96199 96197 96130 96153 96142 96136 96216 96142 96145 96158
96154 96205 96152 96198 96193 96174 96178 96180 96151 96132 96129 96167 96146 96160 96165
96155 96148 96193 96192 96205 96154 96133 96192 96153 96146 96147 96215 96152 96160 96165
96204 96190 96138 96181 96174 96171 96134 96193 96139 96140 96133 96167 96140 96199 96156
96141 96204 96138 96137 96187 96171 96155 96191 96167 96137 96131 96214 96152 96143 96163
96195 96213 96147 96140 96188 96137 96152 96135 96147 96138 96134 96178 96146 96139 96173
96142 96202 96136 96119 96137 96175 96179 96133 96139 96138 96132 96167 96146 96163 96173
96201 96192 96130 96299 96187 96174 96173 96177 96135 96141 96133 96212 96141 96179 96130
96179 96191 96177 96311 96178 96177 96181 96139 96140 96137 96135 96167 96148 96175 96133
96189 96180 96188 96188 96120 96177 96110 96177 96166 96134 96131 96208 96147 96156 96196
96192 96209 96151 96138 96151 96198 96134 96193 96154 96149 96159 96190 96153 96139 96153
96182 96178 96139 96310 96175 96171 96180 96187 96139 96133 96123 96214 96147 96174 96165
96199 96195 96180 96182 96176 96180 96178 96206 96142 96132 96131 96169 96150 96155 96154
96150 96211 96133 96122 96198 96131 96187 96179 96167 96132 96164 96187 96146 96143 96131

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 96165 bytes 100%
1,000 96129 bytes -36 bytes 100%
10,000 96121 bytes -8 bytes 100%
100,000 96115 bytes -6 bytes 1.45%
1,000,000 96110 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
96152 bytes +42 bytes (+0.04%)
96646 bytes +536 bytes (+0.56%) +494 bytes
96600 bytes +490 bytes (+0.51%) +448 bytes
96521 bytes +411 bytes (+0.43%) +369 bytes
96463 bytes +353 bytes (+0.37%) +311 bytes
96382 bytes +272 bytes (+0.28%) +230 bytes
96356 bytes +246 bytes (+0.26%) +204 bytes
96338 bytes +228 bytes (+0.24%) +186 bytes
96224 bytes +114 bytes (+0.12%) +72 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 66140 bytes -29970 bytes (-31.18%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 76263 bytes -19847 bytes (-20.65%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 79206 bytes -16904 bytes (-17.59%)
Brotli (Wikipedia) brotli brotli -q 11 83216 bytes -12894 bytes (-13.42%)
LZMA2 (Wikipedia) xz xz -9 84052 bytes -12058 bytes (-12.55%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 88496 bytes -7614 bytes (-7.92%)
Zstandard (Wikipedia) zstd zstd -19 89277 bytes -6833 bytes (-7.11%)

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.