Choose a version:
51% The original file has 1263689 bytes (1,234.1k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 642741 bytes (627.7k, 51%).

After GZIP compression these minified files vary in size:
unpkg
  195174 bytes (190.6k)
CDN
Boot
  161397 bytes (157.6k)
CDN
gzip -6 (default)
  160586 bytes (156.8k)
local copy
jsdelivr
  160401 bytes (156.6k)
CDN
gzip -9
  159979 bytes (156.2k)
local copy
libdeflate -12
  154631 bytes (151.0k)
local copy
zultra
  154439 bytes (150.8k)
local copy
7zip -mx=9 -tgzip
  154395 bytes (150.8k)
local copy
Zopfli
  154140 bytes (150.5k)
local copy
kzip -s0 -rn -b0
  154091 bytes (150.5k)
local copy
pigz -11 -n
  154059 bytes (150.4k)
local copy

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

You will automatically get the smallest ThreeJS 120 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 6261 bytes by using my ThreeJS 120 Zopfli version instead of the best available CDN (4.06% smaller than jsdelivr, 154140 vs. 160401 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 --bsr15 --lazy --ohh

(found August 28, 2020)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 512  --mls512
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 (154137 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/r120/build/three.min.js --location | md5sum
cda811d72db5107ed71aadcdfd1e6b93  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r120.min.zopfli.js.gz | md5sum
cda811d72db5107ed71aadcdfd1e6b93  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 195174 bytes cda811d72db5107ed71aadcdfd1e6b93 (invalid)
Boot 161397 bytes cda811d72db5107ed71aadcdfd1e6b93 August 26, 2020 @ 15:30
jsdelivr 160401 bytes cda811d72db5107ed71aadcdfd1e6b93 August 27, 2020 @ 14:10

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

Other Versions

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

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
154140 bytes -4 bytes zopfli --i1000000 --mls512 --bsr15 --lazy --ohh August 28, 2020 @ 16:45
154144 bytes -2 bytes zopfli --i100000 --mls512 --bsr15 --lazy --ohh August 27, 2020 @ 00:33
154146 bytes -3 bytes zopfli --i100000 --mls4 --bsr22 --lazy --ohh August 26, 2020 @ 20:38
154149 bytes -3 bytes zopfli --i10000 --mls512 --bsr15 --lazy --ohh August 26, 2020 @ 17:09
154152 bytes -1 byte zopfli --i10000 --mls256 --bsr19 --lazy --ohh August 26, 2020 @ 16:47
154153 bytes -1 byte zopfli --i10000 --mls4 --bsr22 --lazy --ohh August 26, 2020 @ 16:44
154154 bytes -1 byte zopfli --i10000 --mls256 --bsr30 --lazy --ohh August 26, 2020 @ 16:22
154155 bytes -7 bytes zopfli --i10000 --mls256 --bsr23 --lazy --ohh August 26, 2020 @ 16:20
154162 bytes -2 bytes zopfli --i1000 --mls64 --bsr18 --lazy --ohh August 26, 2020 @ 13:48
154164 bytes -3 bytes zopfli --i1000 --mls256 --bsr11 --lazy --ohh August 26, 2020 @ 13:46
154167 bytes -3 bytes zopfli --i1000 --mls256 --bsr19 --lazy --ohh August 26, 2020 @ 13:45
154170 bytes -2 bytes zopfli --i1000 --mls512 --bsr15 --lazy --ohh August 26, 2020 @ 13:45
154172 bytes -22 bytes zopfli --i1000 --mls32 --bsr15 --lazy --ohh August 26, 2020 @ 13:45
154194 bytes zopfli --i100 --mls256 --bsr23 --lazy --ohh August 26, 2020 @ 13:30

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

Most recent activity on August 28, 2020 @ 17:52.

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
154331 154385 154336 154317 154379 154381 154395 154313 154303 154316 154398 154323 154377 154375 154342
154343 154333 154340 154339 154332 154180 154249 154268 154251 154321 154214 154212 154280 154383 154265
154322 154355 154322 154324 154211 154349 154182 154323 154313 154330 154345 154353 154357 154350 154402
154318 154319 154316 154343 154331 154329 154193 154183 154162 154192 154316 154207 154240 154227 154250
154326 154325 154321 154327 154194 154207 154188 154185 154189 154330 154327 154333 154358 154368 154391
154326 154318 154326 154329 154312 154313 154336 154154 154165 154194 154206 154231 154239 154224 154263
154317 154320 154337 154191 154204 154379 154188 154324 154315 154313 154185 154231 154257 154352 154222
154196 154197 154198 154185 154384 154205 154351 154155 154178 154187 154196 154233 154238 154364 154269
154326 154322 154322 154186 154186 154194 154159 154170 154177 154163 154185 154240 154360 154257 154242
154318 154315 154318 154317 154389 154289 154190 154167 154227 154330 154202 154236 154376 154257 154246
154319 154333 154320 154330 154321 154199 154316 154173 154173 154192 154200 154186 154331 154354 154249
154196 154192 154195 154332 154156 154193 154177 154176 154140 154191 154171 154216 154232 154352 154245
154196 154192 154200 154161 154158 154172 154165 154163 154199 154196 154209 154344 154356 154359 154240
154318 154326 154317 154327 154319 154323 154348 154318 154161 154336 154189 154181 154368 154219 154253
154318 154316 154319 154319 154160 154154 154320 154165 154195 154313 154317 154348 154359 154371 154245
154328 154326 154326 154328 154315 154324 154322 154152 154154 154185 154190 154239 154344 154238 154267
154323 154325 154325 154327 154326 154159 154326 154156 154152 154309 154308 154234 154258 154222 154265
154324 154324 154325 154329 154321 154325 154324 154322 154311 154313 154207 154234 154335 154346 154254
154197 154146 154191 154195 154159 154157 154325 154168 154155 154197 154189 154235 154236 154350 154239
154326 154319 154314 154316 154203 154158 154352 154155 154166 154314 154173 154241 154236 154377 154255
154315 154322 154329 154329 154329 154188 154253 154161 154167 154325 154183 154226 154360 154225 154275
154318 154315 154318 154322 154319 154173 154314 154154 154215 154195 154216 154235 154367 154239 154237
154324 154325 154326 154327 154317 154156 154320 154170 154194 154194 154209 154234 154356 154220 154240

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 154194 bytes 100%
1,000 154162 bytes -32 bytes 100%
10,000 154149 bytes -13 bytes 100%
100,000 154144 bytes -5 bytes 0.58%
1,000,000 154140 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
154091 bytes -49 bytes (-0.03%)
154927 bytes +787 bytes (+0.51%) +836 bytes
154900 bytes +760 bytes (+0.49%) +809 bytes
154671 bytes +531 bytes (+0.34%) +580 bytes
154529 bytes +389 bytes (+0.25%) +438 bytes
154531 bytes +391 bytes (+0.25%) +440 bytes
154400 bytes +260 bytes (+0.17%) +309 bytes
154358 bytes +218 bytes (+0.14%) +267 bytes
154324 bytes +184 bytes (+0.12%) +233 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 102391 bytes -51749 bytes (-33.57%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 119876 bytes -34264 bytes (-22.23%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 125071 bytes -29069 bytes (-18.86%)
Brotli (Wikipedia) brotli brotli -q 11 130712 bytes -23428 bytes (-15.20%)
LZMA2 (Wikipedia) xz xz -9 131480 bytes -22660 bytes (-14.70%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 137367 bytes -16773 bytes (-10.88%)
Zstandard (Wikipedia) zstd zstd -19 138232 bytes -15908 bytes (-10.32%)

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