Choose a version:
50% The original file has 808159 bytes (789.2k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 403818 bytes (394.4k, 50%).

After GZIP compression these minified files vary in size:
Boot
  116529 bytes (113.8k)
CDN
cdnjs
  97479 bytes (95.2k)
CDN
gzip -6 (default)
  96539 bytes (94.3k)
local copy
gzip -9
  96110 bytes (93.9k)
local copy
libdeflate -12
  93039 bytes (90.9k)
local copy
7zip -mx=9 -tgzip
  92838 bytes (90.7k)
local copy
zultra
  92782 bytes (90.6k)
local copy
kzip -s0 -rn -b0
  92472 bytes (90.3k)
local copy
pigz -11 -n
  92409 bytes (90.2k)
local copy
Zopfli
  92377 bytes (90.2k)
local copy
Zopfli (defluff)
  92375 bytes (90.2k)
local copy

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

You will automatically get the smallest ThreeJS 57 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 5102 bytes by using my ThreeJS 57 Zopfli version instead of the best available CDN (5.52% smaller than cdnjs, 92377 vs. 97479 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 --mls1024 --bsr22 --lazy --ohh

(found February 14, 2017)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 1024  --mls1024
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 2 more bytes (92375 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/r57/build/three.min.js --location | md5sum
1c3b4cfed3d5dcfbd7447ed5384e02a0  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r57.min.zopfli.js.gz | md5sum
1c3b4cfed3d5dcfbd7447ed5384e02a0  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 116529 bytes 1c3b4cfed3d5dcfbd7447ed5384e02a0 (invalid)
cdnjs 97479 bytes 1c3b4cfed3d5dcfbd7447ed5384e02a0 (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
92377 bytes -4 bytes zopfli --i1000000 --mls1024 --bsr22 --lazy --ohh February 14, 2017 @ 09:12
92381 bytes -1 byte zopfli --i100000 --mls1024 --bsr22 --lazy --ohh December 28, 2015 @ 19:51
92382 bytes -5 bytes zopfli --i100000 --mls8192 --bsr30 --lazy --ohh December 28, 2015 @ 17:05
92387 bytes -1 byte zopfli --i10000 --mls8192 --bsr30 --lazy --ohh November 16, 2015 @ 11:05
92388 bytes -10 bytes zopfli --i10000 --mls1024 --bsr22 --lazy --ohh November 16, 2015 @ 10:49
92398 bytes -1 byte zopfli --i1000 --mls1024 --bsr22 --lazy --ohh November 15, 2015 @ 22:43
92399 bytes -19 bytes zopfli --i1000 --mls8192 --bsr30 --lazy --ohh November 15, 2015 @ 22:26
92418 bytes -12 bytes zopfli --i1000 --mls4096 --bsr9 --lazy --ohh November 15, 2015 @ 21:58
92430 bytes zopfli --i100 --mls1024 --bsr22 --lazy --ohh November 15, 2015 @ 10:47

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

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
92569 92570 92566 92567 92572 92562 92551 92570 92582 92549 92564 92494 92566 92558 92677
92491 92491 92498 92539 92533 92492 92570 92536 92512 92470 92543 92546 92489 92579 92537
92631 92637 92624 92624 92618 92520 92617 92457 92466 92464 92543 92534 92525 92555 92540
92526 92517 92510 92512 92514 92511 92518 92449 92524 92535 92505 92558 92531 92595 92560
92632 92639 92629 92631 92513 92509 92475 92473 92522 92516 92544 92475 92521 92531 92522
92645 92629 92630 92624 92531 92520 92512 92479 92458 92477 92539 92404 92486 92560 92535
92634 92621 92633 92631 92534 92506 92507 92463 92462 92458 92557 92520 92487 92547 92538
92515 92561 92636 92648 92512 92497 92517 92492 92504 92463 92519 92511 92458 92563 92617
92529 92518 92513 92508 92520 92512 92518 92495 92504 92513 92513 92512 92488 92549 92541
92518 92500 92498 92513 92516 92508 92502 92454 92454 92526 92533 92491 92535 92461 92533
92522 92515 92512 92512 92510 92511 92506 92467 92457 92527 92564 92529 92475 92586 92538
92561 92506 92509 92523 92514 92508 92512 92467 92521 92470 92548 92463 92523 92545 92630
92513 92518 92511 92533 92536 92517 92511 92459 92470 92523 92534 92475 92562 92571 92660
92519 92517 92511 92510 92532 92520 92528 92494 92470 92457 92536 92458 92482 92529 92531
92516 92516 92513 92506 92516 92511 92497 92465 92468 92476 92531 92510 92534 92539 92537
92522 92520 92637 92629 92513 92508 92499 92475 92536 92484 92532 92503 92463 92552 92535
92633 92631 92632 92624 92632 92503 92505 92494 92456 92519 92511 92507 92457 92551 92529
92638 92630 92619 92511 92500 92614 92502 92454 92453 92464 92534 92559 92478 92587 92539
92626 92632 92629 92629 92617 92622 92616 92489 92505 92377 92543 92520 92453 92548 92657
92526 92508 92622 92642 92517 92631 92508 92497 92459 92523 92525 92517 92470 92565 92615
92567 92519 92518 92518 92513 92500 92502 92492 92479 92458 92532 92509 92523 92576 92563
92524 92518 92510 92509 92524 92503 92497 92461 92477 92463 92533 92465 92382 92566 92574
92626 92620 92635 92621 92636 92627 92480 92491 92503 92456 92531 92465 92490 92511 92614

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 92430 bytes 100%
1,000 92398 bytes -32 bytes 100%
10,000 92387 bytes -11 bytes 100%
100,000 92381 bytes -6 bytes 0.58%
1,000,000 92377 bytes -4 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
92472 bytes +95 bytes (+0.10%)
92996 bytes +619 bytes (+0.67%) +524 bytes
92870 bytes +493 bytes (+0.53%) +398 bytes
92839 bytes +462 bytes (+0.50%) +367 bytes
92726 bytes +349 bytes (+0.38%) +254 bytes
92687 bytes +310 bytes (+0.34%) +215 bytes
92687 bytes +310 bytes (+0.34%) +215 bytes
92629 bytes +252 bytes (+0.27%) +157 bytes
92639 bytes +262 bytes (+0.28%) +167 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 63228 bytes -29149 bytes (-31.55%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 73187 bytes -19190 bytes (-20.77%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 78005 bytes -14372 bytes (-15.56%)
Brotli (Wikipedia) brotli brotli -q 11 78518 bytes -13859 bytes (-15.00%)
LZMA2 (Wikipedia) xz xz -9 79132 bytes -13245 bytes (-14.34%)
Zstandard (Wikipedia) zstd zstd -19 84499 bytes -7878 bytes (-8.53%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 85305 bytes -7072 bytes (-7.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.