Choose a version:
53% The original file has 1143038 bytes (1,116.2k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 603445 bytes (589.3k, 53%).

After GZIP compression these minified files vary in size:
unpkg
  200996 bytes (196.3k)
CDN
Boot
  149872 bytes (146.4k)
CDN
gzip -6 (default)
  149316 bytes (145.8k)
local copy
jsdelivr
  149178 bytes (145.7k)
CDN
gzip -9
  148850 bytes (145.4k)
local copy
libdeflate -12
  143749 bytes (140.4k)
local copy
7zip -mx=9 -tgzip
  143628 bytes (140.3k)
local copy
zultra
  143520 bytes (140.2k)
local copy
kzip -s0 -rn -b8
  143357 bytes (140.0k)
local copy
Zopfli
  143232 bytes (139.9k)
local copy
pigz -11 -n
  143091 bytes (139.7k)
local copy

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

You will automatically get the smallest ThreeJS 128 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 5946 bytes by using my ThreeJS 128 Zopfli version instead of the best available CDN (4.15% smaller than jsdelivr, 143232 vs. 149178 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 --mls16 --bsr6 --lazy --ohh

(found May 4, 2021)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 16  --mls16
block splitting recursion 6  --bsr6
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 5 more bytes (143227 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/r128/build/three.min.js --location | md5sum
eb8549863a97355411c3259a3f93b8e1  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r128.min.zopfli.js.gz | md5sum
eb8549863a97355411c3259a3f93b8e1  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 200996 bytes eb8549863a97355411c3259a3f93b8e1 (invalid)
Boot 149872 bytes eb8549863a97355411c3259a3f93b8e1 (invalid)
jsdelivr 149178 bytes eb8549863a97355411c3259a3f93b8e1 April 30, 2021 @ 11:47

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
143232 bytes -4 bytes zopfli --i1000000 --mls16 --bsr6 --lazy --ohh May 4, 2021 @ 14:03
143236 bytes -8 bytes zopfli --i100000 --mls16 --bsr6 --lazy --ohh May 3, 2021 @ 14:04
143244 bytes -15 bytes zopfli --i10000 --mls16 --bsr6 --lazy --ohh April 30, 2021 @ 20:37
143259 bytes -3 bytes zopfli --i10000 --mls16 --bsr12 --lazy --ohh April 30, 2021 @ 19:27
143262 bytes -3 bytes zopfli --i1000 --mls16 --bsr6 --lazy --ohh April 30, 2021 @ 16:53
143265 bytes -23 bytes zopfli --i1000 --mls16 --bsr12 --lazy --ohh April 30, 2021 @ 16:51
143288 bytes -21 bytes zopfli --i1000 --mls16384 --bsr21 --lazy --ohh April 30, 2021 @ 16:51
143309 bytes zopfli --i100 --mls16 --bsr6 --lazy --ohh April 30, 2021 @ 16:38

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

Most recent activity on May 4, 2021 @ 15: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
143488 143493 143431 143432 143491 143420 143479 143463 143442 143474 143414 143413 143479 143445 143459
143379 143356 143444 143385 143382 143482 143480 143424 143407 143415 143397 143418 143347 143280 143378
143500 143388 143388 143232 143489 143325 143444 143371 143435 143409 143388 143331 143320 143302 143339
143372 143383 143364 143329 143429 143315 143294 143369 143371 143375 143375 143333 143340 143299 143334
143361 143417 143374 143332 143375 143312 143308 143374 143374 143375 143366 143324 143326 143284 143348
143348 143384 143356 143416 143394 143410 143400 143398 143369 143384 143380 143322 143330 143275 143378
143509 143483 143421 143436 143347 143305 143433 143292 143389 143422 143388 143371 143315 143380 143377
143369 143349 143334 143385 143300 143396 143306 143361 143345 143375 143399 143410 143323 143278 143360
143387 143383 143372 143254 143302 143312 143309 143372 143391 143483 143381 143378 143287 143375 143335
143406 143370 143372 143369 143310 143317 143311 143371 143451 143424 143365 143332 143335 143282 143369
143329 143375 143370 143352 143419 143417 143409 143420 143363 143361 143373 143384 143323 143285 143374
143377 143387 143361 143324 143310 143399 143303 143437 143367 143370 143384 143320 143321 143371 143331
143484 143373 143440 143375 143420 143301 143299 143481 143351 143486 143392 143319 143322 143380 143371
143384 143364 143427 143305 143424 143316 143313 143420 143340 143414 143389 143331 143325 143296 143327
143431 143490 143402 143346 143470 143478 143450 143371 143381 143409 143391 143323 143329 143282 143374
143366 143346 143349 143336 143471 143532 143545 143496 143378 143377 143477 143357 143322 143281 143333
143405 143399 143419 143366 143413 143489 143430 143490 143375 143388 143386 143378 143357 143288 143371
143491 143489 143444 143449 143537 143554 143532 143470 143386 143469 143395 143333 143330 143284 143360
143507 143489 143415 143436 143423 143421 143435 143437 143363 143501 143391 143335 143333 143279 143369
143500 143489 143435 143450 143428 143424 143424 143391 143363 143383 143391 143328 143332 143278 143335
143388 143404 143390 143440 143391 143476 143433 143393 143365 143386 143402 143328 143323 143285 143368
143545 143493 143556 143426 143299 143440 143438 143392 143363 143381 143394 143346 143362 143281 143370
143494 143490 143485 143426 143416 143418 143429 143439 143377 143367 143367 143331 143323 143366 143331

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 143309 bytes 100%
1,000 143262 bytes -47 bytes 100%
10,000 143244 bytes -18 bytes 100%
100,000 143236 bytes -8 bytes 0.58%
1,000,000 143232 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
143388 bytes +156 bytes (+0.11%) +31 bytes
143736 bytes +504 bytes (+0.35%) +379 bytes
143724 bytes +492 bytes (+0.34%) +367 bytes
143487 bytes +255 bytes (+0.18%) +130 bytes
143482 bytes +250 bytes (+0.17%) +125 bytes
143472 bytes +240 bytes (+0.17%) +115 bytes
143451 bytes +219 bytes (+0.15%) +94 bytes
143441 bytes +209 bytes (+0.15%) +84 bytes
143357 bytes +125 bytes (+0.09%)

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 96536 bytes -46696 bytes (-32.60%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 111155 bytes -32077 bytes (-22.40%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 114973 bytes -28259 bytes (-19.73%)
Brotli (Wikipedia) brotli brotli -q 11 120874 bytes -22358 bytes (-15.61%)
LZMA2 (Wikipedia) xz xz -9 121264 bytes -21968 bytes (-15.34%)
Zstandard (Wikipedia) zstd zstd -19 127351 bytes -15881 bytes (-11.09%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 128453 bytes -14779 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 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.