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

After GZIP compression these minified files vary in size:
unpkg
  222228 bytes (217.0k)
CDN
gzip -6 (default)
  151806 bytes (148.2k)
local copy
jsdelivr
  151718 bytes (148.2k)
CDN
gzip -9
  151301 bytes (147.8k)
local copy
libdeflate -12
  146033 bytes (142.6k)
local copy
7zip -mx=9 -tgzip
  145795 bytes (142.4k)
local copy
zultra
  145756 bytes (142.3k)
local copy
kzip -s0 -rn -b0
  145491 bytes (142.1k)
local copy
pigz -11 -n
  145360 bytes (142.0k)
local copy
Zopfli
  145329 bytes (141.9k)
local copy

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

You will automatically get the smallest ThreeJS 143 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 6389 bytes by using my ThreeJS 143 Zopfli version instead of the best available CDN (4.40% smaller than jsdelivr, 145329 vs. 151718 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 --bsr21 --lazy --ohh

(found August 6, 2022)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 2048  --mls2048
block splitting recursion 21  --bsr21
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

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/r143/build/three.min.js --location | md5sum
8f3a67fad486ce0818f816a97af39fde  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r143.min.zopfli.js.gz | md5sum
8f3a67fad486ce0818f816a97af39fde  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 222228 bytes 8f3a67fad486ce0818f816a97af39fde (invalid)
jsdelivr 151718 bytes 8f3a67fad486ce0818f816a97af39fde August 2, 2022 @ 16:13

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
145329 bytes -1 byte zopfli --i1000000 --mls2048 --bsr21 --lazy --ohh August 6, 2022 @ 11:14
145330 bytes -5 bytes zopfli --i1000000 --mls2048 --bsr7 --lazy --ohh August 5, 2022 @ 00:49
145335 bytes -7 bytes zopfli --i100000 --mls2048 --bsr7 --lazy --ohh August 3, 2022 @ 15:22
145342 bytes -17 bytes zopfli --i10000 --mls2048 --bsr7 --lazy --ohh August 3, 2022 @ 12:46
145359 bytes -26 bytes zopfli --i1000 --mls2048 --bsr7 --lazy --ohh August 3, 2022 @ 10:49
145385 bytes zopfli --i100 --mls2048 --bsr11 --lazy --ohh August 2, 2022 @ 16:19

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

Most recent activity on August 6, 2022 @ 11:14.

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
145625 145596 145613 145604 145570 145562 145581 145558 145623 145590 145471 145478 145402 145467 145476
145511 145553 145588 145535 145569 145530 145542 145523 145527 145510 145532 145355 145421 145413 145571
145581 145559 145578 145503 145581 145518 145619 145558 145503 145506 145379 145502 145523 145520 145533
145593 145573 145555 145523 145506 145529 145726 145552 145508 145517 145330 145515 145498 145539 145535
145558 145549 145527 145499 145508 145511 145523 145524 145498 145524 145376 145526 145562 145440 145463
145546 145553 145528 145509 145511 145498 145524 145496 145497 145520 145415 145365 145419 145407 145492
145718 145541 145536 145535 145563 145557 145727 145516 145563 145499 145361 145503 145514 145463 145493
145547 145527 145535 145532 145569 145514 145514 145542 145532 145515 145341 145534 145500 145529 145521
145538 145577 145544 145512 145549 145501 145520 145512 145531 145516 145358 145410 145406 145513 145537
145559 145555 145533 145510 145555 145551 145519 145515 145520 145498 145363 145517 145413 145458 145575
145565 145541 145531 145534 145557 145514 145496 145539 145523 145517 145412 145543 145525 145512 145516
145537 145541 145544 145513 145538 145499 145503 145528 145558 145519 145411 145413 145513 145520 145536
145565 145555 145542 145507 145512 145520 145526 145527 145531 145515 145420 145518 145510 145510 145542
145557 145526 145523 145512 145507 145526 145539 145560 145556 145519 145411 145537 145524 145513 145528
145536 145567 145550 145535 145532 145529 145519 145522 145550 145519 145408 145355 145525 145534 145535
145547 145543 145498 145524 145530 145516 145496 145528 145518 145522 145370 145354 145416 145516 145535
145558 145557 145531 145513 145552 145518 145547 145539 145509 145512 145366 145430 145515 145532 145518
145538 145548 145549 145505 145554 145501 145495 145519 145498 145522 145329 145409 145480 145525 145539
145551 145565 145522 145529 145523 145514 145494 145514 145500 145508 145414 145422 145512 145544 145537
145550 145538 145520 145512 145543 145517 145495 145527 145497 145491 145498 145495 145511 145543 145533
145551 145535 145523 145517 145505 145514 145496 145542 145502 145518 145414 145515 145504 145525 145539
145552 145543 145537 145510 145535 145501 145515 145515 145500 145522 145515 145524 145505 145534 145510
145539 145550 145530 145532 145543 145501 145515 145543 145500 145532 145413 145405 145509 145458 145483

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 145385 bytes 100%
1,000 145359 bytes -26 bytes 100%
10,000 145342 bytes -17 bytes 100%
100,000 145335 bytes -7 bytes 0.87%
1,000,000 145329 bytes -6 bytes 0.58%
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
145491 bytes +162 bytes (+0.11%)
146207 bytes +878 bytes (+0.60%) +716 bytes
146163 bytes +834 bytes (+0.57%) +672 bytes
146011 bytes +682 bytes (+0.47%) +520 bytes
145828 bytes +499 bytes (+0.34%) +337 bytes
145837 bytes +508 bytes (+0.35%) +346 bytes
145735 bytes +406 bytes (+0.28%) +244 bytes
145711 bytes +382 bytes (+0.26%) +220 bytes
145729 bytes +400 bytes (+0.28%) +238 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 99019 bytes -46310 bytes (-31.87%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 117610 bytes -27719 bytes (-19.07%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 118018 bytes -27311 bytes (-18.79%)
Brotli (Wikipedia) brotli brotli -q 11 123758 bytes -21571 bytes (-14.84%)
LZMA2 (Wikipedia) xz xz -9 124204 bytes -21125 bytes (-14.54%)
Zstandard (Wikipedia) zstd zstd -19 130623 bytes -14706 bytes (-10.12%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 131689 bytes -13640 bytes (-9.39%)

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.