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

After GZIP compression these minified files vary in size:
unpkg
  177831 bytes (173.7k)
CDN
cdnjs
  144475 bytes (141.1k)
CDN
gzip -6 (default)
  142908 bytes (139.6k)
local copy
jsdelivr
  142817 bytes (139.5k)
CDN
gzip -9
  142323 bytes (139.0k)
local copy
libdeflate -12
  137583 bytes (134.4k)
local copy
7zip -mx=9 -tgzip
  137473 bytes (134.3k)
local copy
zultra
  137200 bytes (134.0k)
local copy
kzip -s0 -rn -b0
  137001 bytes (133.8k)
local copy
pigz -11 -n
  136995 bytes (133.8k)
local copy
Zopfli
  136910 bytes (133.7k)
local copy
Zopfli (defluff)
  136907 bytes (133.7k)
local copy

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

You will automatically get the smallest ThreeJS 105 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 5907 bytes by using my ThreeJS 105 Zopfli version instead of the best available CDN (4.31% smaller than jsdelivr, 136910 vs. 142817 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 --mls2048 --bsr15 --lazy --ohh

(found June 5, 2019)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 2048  --mls2048
block splitting recursion 15  --bsr15
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 (136907 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/r105/build/three.min.js --location | md5sum
98e007e0879611d9b6153d205ca5c06f  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r105.min.zopfli.js.gz | md5sum
98e007e0879611d9b6153d205ca5c06f  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 177831 bytes 98e007e0879611d9b6153d205ca5c06f (invalid)
cdnjs 144475 bytes 98e007e0879611d9b6153d205ca5c06f (invalid)
jsdelivr 142817 bytes 98e007e0879611d9b6153d205ca5c06f June 3, 2019 @ 14:26

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
136910 bytes -4 bytes zopfli --i1000000 --mls2048 --bsr15 --lazy --ohh June 5, 2019 @ 09:00
136914 bytes -6 bytes zopfli --i100000 --mls2048 --bsr15 --lazy --ohh June 3, 2019 @ 21:08
136920 bytes -17 bytes zopfli --i10000 --mls2048 --bsr15 --lazy --ohh June 3, 2019 @ 17:09
136937 bytes -1 byte zopfli --i10000 --mls4096 --bsr11 --lazy --ohh June 3, 2019 @ 16:56
136938 bytes -4 bytes zopfli --i1000 --mls2048 --bsr15 --lazy --ohh June 3, 2019 @ 14:46
136942 bytes -13 bytes zopfli --i1000 --mls1024 --bsr9 --lazy --ohh June 3, 2019 @ 14:46
136955 bytes zopfli --i100 --mls2048 --bsr13 --lazy --ohh June 3, 2019 @ 14:40

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

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
137215 137230 137217 137219 137200 137076 137241 137214 137018 137240 137070 137074 137103 137068 137109
137035 137241 137246 137242 137247 137033 137079 137080 137043 137052 137040 137164 137172 137258 137145
137164 137193 137194 137170 137175 137181 137150 137216 136958 137208 137144 136956 137147 137147 137144
137018 137012 136977 136976 137182 136992 137236 137001 137172 137212 137231 136947 137128 137152 137146
137020 137024 137016 137004 137169 137003 137178 137042 136948 137282 136977 136965 137141 137157 137136
137230 137050 137209 137224 137209 137211 136991 137001 137034 136933 137225 136955 137153 137125 137138
137004 137009 137141 137011 137203 137003 137215 137233 136958 137125 136966 136960 137155 137156 137151
137000 137009 137204 137206 137204 137212 136997 137007 137038 137133 137133 136937 137142 137135 137175
137168 137139 137141 137202 137190 137173 137243 137037 137000 137139 136961 136952 137154 137151 137088
137167 137187 137140 137146 137167 137139 137183 137126 137124 137132 136927 136954 137107 137152 137277
137200 137143 137138 137204 137213 137203 137227 137007 137077 137204 137217 137149 137185 137155 137109
137179 137183 137174 137172 137180 137175 137184 137006 137172 137130 136910 136958 136953 137173 137101
137146 137133 137188 137205 137205 136966 137231 137000 137030 137208 137208 136953 137177 137171 137090
137165 137170 137221 137207 137204 136997 137034 137058 137083 137123 137217 136960 137111 137180 137103
137169 137197 137190 137207 137199 137197 137034 137080 137037 137124 136969 136946 137097 137158 137091
137187 137228 137233 137206 137194 137200 137212 137036 137035 137129 137217 137147 137159 137151 137097
137021 137149 137220 137184 137205 137181 136967 137225 137033 137150 137135 136918 137138 137154 137087
137195 137198 137206 137203 137205 137173 137221 137003 137040 137202 137054 136954 137128 137145 137089
137218 137136 137142 137213 137204 137232 137223 137036 137076 137130 137206 136950 137153 137155 137086
137168 137181 137205 137205 137203 136964 137195 137003 137037 137130 137127 136925 137152 137145 137138
137167 137144 137157 137204 137193 137175 137132 137005 137035 137131 137135 136954 137153 137128 137093
137008 137006 137213 137210 137184 137203 137214 136997 137001 137131 136973 137017 137131 137130 137106
137189 137137 137193 137203 137206 137203 137241 137043 137033 137205 137218 137145 137152 137153 137088

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 136955 bytes 100%
1,000 136938 bytes -17 bytes 100%
10,000 136920 bytes -18 bytes 100%
100,000 136914 bytes -6 bytes 0.58%
1,000,000 136910 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
137001 bytes +91 bytes (+0.07%)
137676 bytes +766 bytes (+0.56%) +675 bytes
137631 bytes +721 bytes (+0.53%) +630 bytes
137480 bytes +570 bytes (+0.42%) +479 bytes
137359 bytes +449 bytes (+0.33%) +358 bytes
137329 bytes +419 bytes (+0.31%) +328 bytes
137077 bytes +167 bytes (+0.12%) +76 bytes
137135 bytes +225 bytes (+0.16%) +134 bytes
137082 bytes +172 bytes (+0.13%) +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 91741 bytes -45169 bytes (-32.99%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 105548 bytes -31362 bytes (-22.91%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 109265 bytes -27645 bytes (-20.19%)
Brotli (Wikipedia) brotli brotli -q 11 116286 bytes -20624 bytes (-15.06%)
LZMA2 (Wikipedia) xz xz -9 116920 bytes -19990 bytes (-14.60%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 121898 bytes -15012 bytes (-10.96%)
Zstandard (Wikipedia) zstd zstd -19 123003 bytes -13907 bytes (-10.16%)

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.