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

After GZIP compression these minified files vary in size:
unpkg
  220070 bytes (214.9k)
CDN
gzip -6 (default)
  150027 bytes (146.5k)
local copy
jsdelivr
  149957 bytes (146.4k)
CDN
gzip -9
  149546 bytes (146.0k)
local copy
libdeflate -12
  144398 bytes (141.0k)
local copy
7zip -mx=9 -tgzip
  144223 bytes (140.8k)
local copy
zultra
  144210 bytes (140.8k)
local copy
kzip -s0 -rn -b0
  143993 bytes (140.6k)
local copy
pigz -11 -n
  143833 bytes (140.5k)
local copy
Zopfli
  143827 bytes (140.5k)
local copy
Zopfli (defluff)
  143824 bytes (140.5k)
local copy

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

You will automatically get the smallest ThreeJS 141 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 6130 bytes by using my ThreeJS 141 Zopfli version instead of the best available CDN (4.26% smaller than jsdelivr, 143827 vs. 149957 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 --bsr10 --lazy --ohh

(found July 5, 2022)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 4096  --mls4096
block splitting recursion 10  --bsr10
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 (143824 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/r141/build/three.min.js --location | md5sum
62c656c0e103dca6d179be9281e839ee  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r141.min.zopfli.js.gz | md5sum
62c656c0e103dca6d179be9281e839ee  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 220070 bytes 62c656c0e103dca6d179be9281e839ee (invalid)
jsdelivr 149957 bytes 62c656c0e103dca6d179be9281e839ee June 30, 2022 @ 11:12

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

Other Versions

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

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
143827 bytes -5 bytes zopfli --i1000000 --mls4096 --bsr10 --lazy --ohh July 5, 2022 @ 13:03
143832 bytes -9 bytes zopfli --i100000 --mls4096 --bsr10 --lazy --ohh July 4, 2022 @ 14:42
143841 bytes -18 bytes zopfli --i10000 --mls4096 --bsr10 --lazy --ohh June 30, 2022 @ 17:54
143859 bytes -24 bytes zopfli --i1000 --mls4096 --bsr10 --lazy --ohh June 30, 2022 @ 12:19
143883 bytes zopfli --i100 --mls4096 --bsr10 --lazy --ohh June 30, 2022 @ 11:33

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

Most recent activity on July 5, 2022 @ 15:26.

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
143976 143981 143982 143989 143989 143960 144090 144007 143929 143925 144069 143964 144038 143977 143983
143983 143960 143954 143932 143951 143992 143961 143980 143890 143936 143905 143910 143931 143909 143918
143937 143985 143939 143984 143954 143982 143946 143904 143947 143922 143909 143908 143950 143926 143944
143906 143894 143893 143931 143942 143912 143906 143920 143874 143917 143920 143901 143843 143922 143941
143942 143955 143938 143928 143918 143903 143937 143929 143902 143911 143871 143920 143904 143940 143966
143967 143953 143933 143931 143955 143942 143934 143923 143901 143902 143910 143902 143900 143922 143934
143922 143923 143937 143925 143941 143910 143917 143903 143920 143917 143925 143827 143934 143922 143932
143904 143938 143923 143939 143945 143939 143919 143912 143873 143910 143898 143929 143902 143947 143915
143936 143921 143948 143945 143926 143901 143915 143902 143925 143922 143900 143907 143921 143914 143941
143961 143898 143936 143947 143973 143960 143976 143912 143905 143911 143902 143907 143907 143914 143916
143941 143947 143946 143902 143941 143917 143910 143894 143906 143915 143906 143913 143895 143917 143910
143943 143904 143944 143926 143942 143937 143918 143900 143925 143912 143902 143906 143905 143935 143957
143954 143919 143932 143900 143941 143906 143925 143906 143922 143917 143902 143909 143895 143922 143941
143928 143936 143909 143950 143929 143934 143917 143918 143920 143914 143873 143930 143920 143911 143923
143953 143951 143924 143936 143918 143942 143943 143920 143917 143921 143904 143920 143911 143917 143946
143934 143980 143926 143947 143933 143939 143910 143922 143904 143910 143899 143908 143913 143906 143936
143938 143939 143931 143905 143940 143894 143898 143922 143902 143908 143906 143904 143913 143905 143947
143964 143951 143949 143931 143944 143935 143917 143925 143917 143925 143898 143914 143910 143905 143933
143964 143950 143931 143915 143929 143923 143913 143922 143903 143916 143863 143925 143934 143945 143931
143940 143958 143935 143903 143941 143940 143916 143902 143920 143901 143906 143920 143905 143908 143935
143955 143940 143931 143929 143923 143929 143917 143902 143924 143868 143900 143906 143911 143895 143937
143908 143896 143929 143930 143922 143939 143916 143918 143907 143919 143899 143920 143935 143900 143940
143943 143944 143931 143929 143922 143935 143942 143905 143909 143920 143901 143902 143906 143936 143941

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 143883 bytes 100%
1,000 143859 bytes -24 bytes 100%
10,000 143841 bytes -18 bytes 100%
100,000 143832 bytes -9 bytes 0.58%
1,000,000 143827 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
143993 bytes +166 bytes (+0.12%)
144424 bytes +597 bytes (+0.42%) +431 bytes
144395 bytes +568 bytes (+0.39%) +402 bytes
144132 bytes +305 bytes (+0.21%) +139 bytes
144142 bytes +315 bytes (+0.22%) +149 bytes
144112 bytes +285 bytes (+0.20%) +119 bytes
144023 bytes +196 bytes (+0.14%) +30 bytes
144068 bytes +241 bytes (+0.17%) +75 bytes
144074 bytes +247 bytes (+0.17%) +81 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 98097 bytes -45730 bytes (-31.80%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 112906 bytes -30921 bytes (-21.50%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 116654 bytes -27173 bytes (-18.89%)
Brotli (Wikipedia) brotli brotli -q 11 122797 bytes -21030 bytes (-14.62%)
LZMA2 (Wikipedia) xz xz -9 123136 bytes -20691 bytes (-14.39%)
Zstandard (Wikipedia) zstd zstd -19 129284 bytes -14543 bytes (-10.11%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 130071 bytes -13756 bytes (-9.56%)

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