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

After GZIP compression these minified files vary in size:
cdnjs
  133085 bytes (130.0k)
CDN
unpkg
  131850 bytes (128.8k)
CDN
jsdelivr
  131700 bytes (128.6k)
CDN
gzip -6 (default)
  131636 bytes (128.6k)
local copy
gzip -9
  131181 bytes (128.1k)
local copy
libdeflate -12
  126738 bytes (123.8k)
local copy
7zip -mx=9 -tgzip
  126657 bytes (123.7k)
local copy
zultra
  126598 bytes (123.6k)
local copy
pigz -11 -n
  126312 bytes (123.4k)
local copy
kzip -s0 -rn -b0
  126293 bytes (123.3k)
local copy
Zopfli
  126236 bytes (123.3k)
local copy
Zopfli (defluff)
  126231 bytes (123.3k)
local copy

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

You will automatically get the smallest ThreeJS 88 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 5464 bytes by using my ThreeJS 88 Zopfli version instead of the best available CDN (4.33% smaller than jsdelivr, 126236 vs. 131700 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 --mls64 --bsr7 --lazy --ohh

(found November 8, 2017)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 64  --mls64
block splitting recursion 7  --bsr7
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 5 more bytes (126231 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/r88/build/three.min.js --location | md5sum
bddd3c70f6e94b2c969bb1e7f723bea4  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r88.min.zopfli.js.gz | md5sum
bddd3c70f6e94b2c969bb1e7f723bea4  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
cdnjs 133085 bytes bddd3c70f6e94b2c969bb1e7f723bea4 (invalid)
unpkg 131850 bytes bddd3c70f6e94b2c969bb1e7f723bea4 (invalid)
jsdelivr 131700 bytes bddd3c70f6e94b2c969bb1e7f723bea4 November 9, 2017 @ 11:40

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
126236 bytes -5 bytes zopfli --i1000000 --mls64 --bsr7 --lazy --ohh November 8, 2017 @ 23:04
126241 bytes -9 bytes zopfli --i100000 --mls64 --bsr7 --lazy --ohh November 7, 2017 @ 08:46
126250 bytes -17 bytes zopfli --i10000 --mls64 --bsr7 --lazy --ohh November 7, 2017 @ 00:15
126267 bytes -29 bytes zopfli --i1000 --mls64 --bsr7 --lazy --ohh November 6, 2017 @ 14:22
126296 bytes zopfli --i100 --mls64 --bsr7 --lazy --ohh November 6, 2017 @ 13:10

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
126442 126410 126389 126396 126340 126323 126333 126310 126340 126405 126413 126413 126363 126414 126371
126388 126390 126396 126371 126392 126327 126366 126379 126348 126350 126375 126327 126298 126358 126344
126397 126403 126402 126406 126317 126318 126338 126339 126336 126360 126341 126330 126350 126341 126357
126400 126393 126421 126335 126368 126236 126389 126379 126343 126359 126345 126327 126322 126333 126344
126399 126404 126408 126405 126406 126345 126347 126341 126339 126373 126354 126353 126340 126421 126344
126394 126389 126408 126402 126405 126321 126390 126323 126329 126345 126346 126340 126344 126341 126369
126398 126396 126399 126394 126325 126324 126394 126324 126331 126342 126345 126341 126345 126339 126350
126397 126397 126404 126396 126395 126322 126392 126325 126336 126344 126349 126346 126334 126359 126356
126335 126392 126392 126403 126337 126324 126333 126336 126349 126340 126346 126341 126321 126330 126351
126407 126338 126425 126390 126389 126293 126317 126338 126337 126358 126342 126342 126321 126343 126349
126406 126404 126345 126391 126397 126391 126388 126344 126343 126344 126341 126347 126331 126342 126342
126403 126391 126401 126391 126384 126268 126397 126326 126322 126342 126349 126346 126337 126325 126341
126389 126395 126387 126394 126396 126314 126401 126324 126324 126343 126349 126399 126323 126329 126343
126407 126386 126352 126390 126393 126404 126401 126398 126330 126345 126339 126396 126298 126331 126352
126391 126404 126393 126394 126391 126391 126330 126409 126327 126354 126346 126394 126325 126329 126347
126394 126338 126391 126396 126387 126345 126332 126393 126340 126342 126342 126346 126340 126323 126377
126397 126403 126409 126401 126401 126402 126399 126389 126347 126342 126347 126342 126330 126365 126340
126396 126392 126392 126401 126327 126322 126388 126313 126330 126399 126358 126346 126334 126331 126373
126399 126397 126396 126398 126331 126325 126389 126328 126332 126342 126345 126344 126323 126327 126339
126401 126404 126352 126400 126404 126308 126388 126399 126348 126347 126341 126345 126325 126343 126333
126404 126397 126341 126325 126394 126326 126336 126328 126337 126338 126348 126340 126326 126363 126352
126396 126405 126347 126394 126405 126396 126387 126339 126329 126346 126350 126345 126349 126353 126354
126334 126407 126328 126394 126336 126319 126335 126330 126346 126342 126338 126337 126324 126339 126342

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 126296 bytes 100%
1,000 126267 bytes -29 bytes 100%
10,000 126250 bytes -17 bytes 100%
100,000 126241 bytes -9 bytes 0.58%
1,000,000 126236 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
126293 bytes +57 bytes (+0.05%)
126896 bytes +660 bytes (+0.52%) +603 bytes
126874 bytes +638 bytes (+0.51%) +581 bytes
126635 bytes +399 bytes (+0.32%) +342 bytes
126560 bytes +324 bytes (+0.26%) +267 bytes
126430 bytes +194 bytes (+0.15%) +137 bytes
126472 bytes +236 bytes (+0.19%) +179 bytes
126429 bytes +193 bytes (+0.15%) +136 bytes
126328 bytes +92 bytes (+0.07%) +35 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 85315 bytes -40921 bytes (-32.42%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 97993 bytes -28243 bytes (-22.37%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 104358 bytes -21878 bytes (-17.33%)
Brotli (Wikipedia) brotli brotli -q 11 107693 bytes -18543 bytes (-14.69%)
LZMA2 (Wikipedia) xz xz -9 108424 bytes -17812 bytes (-14.11%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 112865 bytes -13371 bytes (-10.59%)
Zstandard (Wikipedia) zstd zstd -19 114613 bytes -11623 bytes (-9.21%)

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.