Choose a version:
50% The original file has 1150054 bytes (1,123.1k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 571560 bytes (558.2k, 50%).

After GZIP compression these minified files vary in size:
unpkg
  177076 bytes (172.9k)
CDN
cdnjs
  143964 bytes (140.6k)
CDN
gzip -6 (default)
  142393 bytes (139.1k)
local copy
jsdelivr
  142311 bytes (139.0k)
CDN
gzip -9
  141840 bytes (138.5k)
local copy
libdeflate -12
  136982 bytes (133.8k)
local copy
7zip -mx=9 -tgzip
  136966 bytes (133.8k)
local copy
kzip -s0 -rn -b0
  136529 bytes (133.3k)
local copy
pigz -11 -n
  136514 bytes (133.3k)
local copy
Zopfli
  136436 bytes (133.2k)
local copy
Zopfli (defluff)
  136433 bytes (133.2k)
local copy

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

You will automatically get the smallest ThreeJS 104 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 5875 bytes by using my ThreeJS 104 Zopfli version instead of the best available CDN (4.31% smaller than jsdelivr, 136436 vs. 142311 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 --bsr20 --lazy --ohh

(found May 1, 2019)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 4096  --mls4096
block splitting recursion 20  --bsr20
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 (136433 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/r104/build/three.min.js --location | md5sum
d9f7c8e2c798bfbcd1f1ecd6a1ef6ef0  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r104.min.zopfli.js.gz | md5sum
d9f7c8e2c798bfbcd1f1ecd6a1ef6ef0  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 177076 bytes d9f7c8e2c798bfbcd1f1ecd6a1ef6ef0 (invalid)
cdnjs 143964 bytes d9f7c8e2c798bfbcd1f1ecd6a1ef6ef0 (invalid)
jsdelivr 142311 bytes d9f7c8e2c798bfbcd1f1ecd6a1ef6ef0 May 2, 2019 @ 08:29

Note: only the MD5 hashes are shown to keep things simple.

Other Versions

Available ThreeJS versions at minime.stephan-brumme.com:

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
136436 bytes -3 bytes zopfli --i1000000 --mls4096 --bsr20 --lazy --ohh May 1, 2019 @ 07:58
136439 bytes -1 byte zopfli --i100000 --mls4096 --bsr20 --lazy --ohh April 29, 2019 @ 21:27
136440 bytes -5 bytes zopfli --i100000 --mls2048 --bsr25 --lazy --ohh April 29, 2019 @ 17:52
136445 bytes -1 byte zopfli --i10000 --mls4096 --bsr20 --lazy --ohh April 29, 2019 @ 16:24
136446 bytes -1 byte zopfli --i10000 --mls2048 --bsr15 --lazy --ohh April 29, 2019 @ 14:46
136447 bytes -7 bytes zopfli --i10000 --mls2048 --bsr25 --lazy --ohh April 29, 2019 @ 14:43
136454 bytes -5 bytes zopfli --i1000 --mls2048 --bsr25 --lazy --ohh April 29, 2019 @ 12:42
136459 bytes -3 bytes zopfli --i1000 --mls2048 --bsr9 --lazy --ohh April 29, 2019 @ 12:42
136462 bytes -11 bytes zopfli --i1000 --mls4096 --bsr20 --lazy --ohh April 29, 2019 @ 12:42
136473 bytes zopfli --i100 --mls2048 --bsr25 --lazy --ohh April 29, 2019 @ 11:53

If there are multiple parameter sets yielding the same compressed size, only the first one found is shown.

Most recent activity on May 2, 2019 @ 08:29.

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
136763 136764 136770 136781 136793 136741 136806 136747 136754 136779 136767 136609 136607 136589 136612
136770 136712 136689 136556 136766 136589 136764 136582 136603 136693 136759 136719 136689 136783 136683
136684 136683 136698 136703 136701 136707 136698 136737 136704 136721 136707 136678 136681 136680 136672
136694 136705 136692 136738 136734 136660 136762 136757 136647 136711 136453 136680 136614 136677 136610
136535 136532 136667 136528 136547 136668 136659 136659 136698 136807 136706 136516 136677 136659 136669
136527 136561 136690 136729 136751 136736 136711 136750 136460 136448 136446 136500 136675 136664 136674
136528 136527 136528 136527 136680 136655 136708 136514 136534 136652 136542 136653 136677 136660 136687
136531 136522 136695 136710 136723 136744 136653 136657 136703 136657 136515 136454 136679 136699 136618
136695 136692 136668 136692 136767 136636 136663 136725 136731 136663 136531 136621 136769 136653 136618
136685 136684 136681 136670 136674 136681 136662 136676 136696 136653 136447 136525 136618 136671 136635
136703 136692 136678 136713 136748 136732 136746 136768 136608 136651 136745 136506 136675 136676 136650
136687 136685 136512 136698 136696 136708 136712 136750 136534 136673 136446 136694 136657 136677 136623
136685 136717 136744 136746 136732 136760 136728 136730 136715 136663 136747 136625 136641 136712 136630
136525 136610 136525 136639 136723 136495 136712 136734 136599 136660 136701 136637 136628 136652 136621
136746 136723 136726 136728 136740 136749 136728 136769 136759 136651 136712 136708 136629 136656 136634
136714 136738 136723 136758 136749 136769 136721 136759 136704 136664 136469 136463 136627 136684 136639
136544 136687 136612 136734 136737 136702 136726 136754 136771 136649 136657 136436 136639 136507 136622
136547 136527 136718 136765 136715 136704 136717 136773 136769 136673 136658 136519 136619 136680 136615
136528 136527 136716 136759 136756 136726 136708 136766 136752 136656 136532 136530 136617 136678 136615
136697 136695 136718 136770 136732 136491 136644 136757 136745 136652 136463 136486 136674 136680 136621
136695 136694 136664 136760 136703 136654 136710 136655 136646 136660 136440 136528 136668 136659 136621
136600 136541 136697 136775 136704 136736 136700 136751 136710 136656 136452 136659 136479 136650 136633
136714 136618 136721 136766 136727 136722 136723 136755 136737 136460 136502 136519 136627 136656 136620

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 136473 bytes 100%
1,000 136454 bytes -19 bytes 100%
10,000 136445 bytes -9 bytes 100%
100,000 136439 bytes -6 bytes 0.58%
1,000,000 136436 bytes -3 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
136529 bytes +93 bytes (+0.07%)
137192 bytes +756 bytes (+0.55%) +663 bytes
137155 bytes +719 bytes (+0.53%) +626 bytes
136989 bytes +553 bytes (+0.41%) +460 bytes
136868 bytes +432 bytes (+0.32%) +339 bytes
136686 bytes +250 bytes (+0.18%) +157 bytes
136696 bytes +260 bytes (+0.19%) +167 bytes
136663 bytes +227 bytes (+0.17%) +134 bytes
136597 bytes +161 bytes (+0.12%) +68 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 91646 bytes -44790 bytes (-32.83%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 105321 bytes -31115 bytes (-22.81%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 109069 bytes -27367 bytes (-20.06%)
Brotli (Wikipedia) brotli brotli -q 11 115815 bytes -20621 bytes (-15.11%)
LZMA2 (Wikipedia) xz xz -9 116652 bytes -19784 bytes (-14.50%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 121250 bytes -15186 bytes (-11.13%)
Zstandard (Wikipedia) zstd zstd -19 122610 bytes -13826 bytes (-10.13%)

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 2019.
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