Choose a version:
52% The original file has 1247235 bytes (1,218.0k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 653449 bytes (638.1k, 52%).

After GZIP compression these minified files vary in size:
unpkg
  195486 bytes (190.9k)
CDN
Boot
  159871 bytes (156.1k)
CDN
gzip -6 (default)
  159177 bytes (155.4k)
local copy
jsdelivr
  159173 bytes (155.4k)
CDN
gzip -9
  158587 bytes (154.9k)
local copy
libdeflate -12
  153360 bytes (149.8k)
local copy
7zip -mx=9 -tgzip
  153119 bytes (149.5k)
local copy
zultra
  153035 bytes (149.4k)
local copy
kzip -s0 -rn -b0
  152900 bytes (149.3k)
local copy
Zopfli
  152829 bytes (149.2k)
local copy
pigz -11 -n
  152695 bytes (149.1k)
local copy

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

You will automatically get the smallest ThreeJS 124 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 6344 bytes by using my ThreeJS 124 Zopfli version instead of the best available CDN (4.15% smaller than jsdelivr, 152829 vs. 159173 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 --mls512 --bsr2 --lazy --ohh

(found January 26, 2021)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 512  --mls512
block splitting recursion 2  --bsr2
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 (152826 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/r124/build/three.min.js --location | md5sum
90d6d98d20508bd01797c8729ef4e58a  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r124.min.zopfli.js.gz | md5sum
90d6d98d20508bd01797c8729ef4e58a  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 195486 bytes 90d6d98d20508bd01797c8729ef4e58a (invalid)
Boot 159871 bytes 90d6d98d20508bd01797c8729ef4e58a (invalid)
jsdelivr 159173 bytes 90d6d98d20508bd01797c8729ef4e58a January 15, 2021 @ 10:46

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
152829 bytes -6 bytes zopfli --i1000000 --mls512 --bsr2 --lazy --ohh January 26, 2021 @ 12:22
152835 bytes -3 bytes zopfli --i100000 --mls512 --bsr2 --lazy --ohh January 20, 2021 @ 15:03
152838 bytes -5 bytes zopfli --i10000 --mls512 --bsr2 --lazy --ohh January 16, 2021 @ 11:35
152843 bytes -7 bytes zopfli --i10000 --mls256 --bsr16 --lazy --ohh January 16, 2021 @ 01:53
152850 bytes -5 bytes zopfli --i10000 --mls32768 --bsr14 --lazy --ohh January 16, 2021 @ 00:58
152855 bytes -3 bytes zopfli --i1000 --mls32768 --bsr22 --lazy --ohh January 15, 2021 @ 14:32
152858 bytes -3 bytes zopfli --i1000 --mls256 --bsr2 --lazy --ohh January 15, 2021 @ 13:41
152861 bytes -14 bytes zopfli --i1000 --mls32768 --bsr18 --lazy --ohh January 15, 2021 @ 13:12
152875 bytes -4 bytes zopfli --i1000 --mls2048 --bsr22 --lazy --ohh January 15, 2021 @ 13:03
152879 bytes -2 bytes zopfli --i1000 --mls4096 --bsr16 --lazy --ohh January 15, 2021 @ 12:59
152881 bytes zopfli --i100 --mls16384 --bsr40 --lazy --ohh January 15, 2021 @ 11:22

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

Most recent activity on January 28, 2021 @ 13:55.

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
152952 152955 152951 152969 152969 152962 152954 152840 152829 152922 152836 152945 152942 152908 153075
153027 153036 153022 153023 153053 153083 153065 153066 152963 153076 152871 152875 153053 152877 152873
153048 153044 153072 153044 153036 153033 153024 152855 152888 153005 152878 152876 152872 152892 152867
153039 153028 153041 153026 153027 153031 152901 152857 152867 152973 152948 152873 152886 152867 152872
153009 152864 153044 153015 152972 152936 152943 152883 152903 152890 152915 152885 152857 152888 152900
153020 153023 153040 153035 153025 153043 153032 152860 153010 153001 152861 152870 152875 152855 152872
153040 153038 153076 153040 153036 153029 153015 152898 153018 152913 152898 152871 153026 152858 152874
153065 153018 153042 153045 153027 153042 153023 152889 152998 152952 152858 152882 152884 152861 152862
153028 153032 153036 153047 153030 153048 153044 152883 153002 153005 152892 152895 152882 152889 152916
153035 153025 153045 153040 153030 153038 153036 152895 153024 152997 152875 152900 152885 152874 152865
153053 152932 152887 153056 152883 152888 152908 152844 152885 152963 152921 152858 152855 152882 152850
153047 153033 153049 153049 153048 153045 153031 152881 152873 153079 153079 153101 152862 152851 152880
153029 153029 153021 153042 153031 153035 153026 152843 152881 152900 152895 152859 152864 152843 152874
153031 153053 153021 153043 153032 153035 153032 152999 153008 153001 152944 152868 152849 152844 152868
153036 153039 153033 153044 153035 152901 153020 152883 152998 152997 152868 152884 152899 152867 152852
153045 153036 153045 153037 153027 153029 153035 152864 153045 153008 152865 152870 152841 152847 152858
153041 153013 153032 153037 152878 153026 153012 152902 153005 152986 152861 152860 152874 152855 152869
153030 153030 153026 153041 153033 153023 153023 152868 152872 152967 152880 152860 152852 152844 152870
153039 153031 153034 153038 153023 153040 153018 152856 152872 152873 152853 152859 152849 152867 152840
153034 153021 153035 153045 153025 153021 153024 153004 153105 152916 152864 152860 152842 152903 152890
153040 153008 153036 153035 153035 153036 153019 152883 153030 153029 152856 152860 152860 152887 152897
153031 153021 153037 153045 153034 153027 153019 153004 152895 153006 152872 152862 152840 152849 152885
153040 153029 153034 153037 153028 153037 153026 152884 153003 153004 152878 152895 152860 152842 152870

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 152881 bytes 100%
1,000 152855 bytes -26 bytes 100%
10,000 152838 bytes -17 bytes 100%
100,000 152835 bytes -3 bytes 0.58%
1,000,000 152829 bytes -6 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
152900 bytes +71 bytes (+0.05%)
153345 bytes +516 bytes (+0.34%) +445 bytes
153347 bytes +518 bytes (+0.34%) +447 bytes
153130 bytes +301 bytes (+0.20%) +230 bytes
153055 bytes +226 bytes (+0.15%) +155 bytes
153025 bytes +196 bytes (+0.13%) +125 bytes
153006 bytes +177 bytes (+0.12%) +106 bytes
153004 bytes +175 bytes (+0.11%) +104 bytes
153018 bytes +189 bytes (+0.12%) +118 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 103031 bytes -49798 bytes (-32.58%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 118634 bytes -34195 bytes (-22.37%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 122943 bytes -29886 bytes (-19.56%)
Brotli (Wikipedia) brotli brotli -q 11 128799 bytes -24030 bytes (-15.72%)
LZMA2 (Wikipedia) xz xz -9 129164 bytes -23665 bytes (-15.48%)
Zstandard (Wikipedia) zstd zstd -19 135833 bytes -16996 bytes (-11.12%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 137335 bytes -15494 bytes (-10.14%)

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.