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

After GZIP compression these minified files vary in size:
unpkg
  222107 bytes (216.9k)
CDN
gzip -6 (default)
  151678 bytes (148.1k)
local copy
jsdelivr
  151591 bytes (148.0k)
CDN
gzip -9
  151197 bytes (147.7k)
local copy
libdeflate -12
  145926 bytes (142.5k)
local copy
7zip -mx=9 -tgzip
  145627 bytes (142.2k)
local copy
zultra
  145602 bytes (142.2k)
local copy
kzip -s0 -rn -b0
  145331 bytes (141.9k)
local copy
Zopfli
  145189 bytes (141.8k)
local copy
pigz -11 -n
  145171 bytes (141.8k)
local copy

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

You will automatically get the smallest ThreeJS 144 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 6402 bytes by using my ThreeJS 144 Zopfli version instead of the best available CDN (4.41% smaller than jsdelivr, 145189 vs. 151591 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 --bsr7 --lazy --ohh

(found September 21, 2022)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 4096  --mls4096
block splitting recursion 7  --bsr7
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 2 more bytes (145187 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/r144/build/three.min.js --location | md5sum
01f0e9a62f5316f0a54f011ee005d947  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r144.min.zopfli.js.gz | md5sum
01f0e9a62f5316f0a54f011ee005d947  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 222107 bytes 01f0e9a62f5316f0a54f011ee005d947 (invalid)
jsdelivr 151591 bytes 01f0e9a62f5316f0a54f011ee005d947 September 19, 2022 @ 14:39

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
145189 bytes -4 bytes zopfli --i1000000 --mls4096 --bsr7 --lazy --ohh September 21, 2022 @ 20:02
145193 bytes -6 bytes zopfli --i100000 --mls4096 --bsr7 --lazy --ohh September 20, 2022 @ 13:50
145199 bytes -4 bytes zopfli --i10000 --mls4096 --bsr7 --lazy --ohh September 20, 2022 @ 00:05
145203 bytes -7 bytes zopfli --i10000 --mls2048 --bsr6 --lazy --ohh September 19, 2022 @ 23:37
145210 bytes -11 bytes zopfli --i10000 --mls4096 --bsr6 --lazy --ohh September 19, 2022 @ 23:23
145221 bytes -1 byte zopfli --i10000 --mls16384 --bsr6 --lazy --ohh September 19, 2022 @ 22:40
145222 bytes -16 bytes zopfli --i1000 --mls4096 --bsr7 --lazy --ohh September 19, 2022 @ 15:19
145238 bytes zopfli --i100 --mls4096 --bsr7 --lazy --ohh September 19, 2022 @ 14:59

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

Most recent activity on September 23, 2022 @ 10:34.

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 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
145427 145450 145461 145453 145469 145429 145460 145478 145480 145459 145386 145375 145406 145302 145473
145361 145390 145426 145376 145381 145402 145395 145395 145369 145390 145375 145268 145349 145350 145379
145380 145403 145386 145369 145359 145372 145370 145371 145375 145367 145203 145210 145215 145221 145359
145374 145373 145373 145392 145380 145393 145534 145361 145366 145359 145352 145189 145245 145365 145373
145372 145388 145400 145395 145398 145378 145383 145367 145373 145372 145346 145352 145254 145367 145358
145378 145360 145387 145367 145353 145370 145375 145335 145367 145346 145360 145356 145350 145260 145367
145407 145413 145396 145362 145356 145388 145411 145413 145371 145509 145346 145259 145316 145296 145373
145374 145381 145367 145373 145382 145379 145390 145372 145373 145350 145321 145334 145325 145346 145351
145388 145383 145390 145374 145375 145361 145355 145358 145365 145339 145329 145337 145336 145348 145371
145393 145408 145382 145365 145363 145358 145367 145355 145358 145370 145372 145375 145311 145350 145358
145380 145366 145370 145366 145342 145369 145350 145338 145361 145360 145330 145350 145247 145367 145373
145372 145355 145395 145376 145394 145393 145361 145369 145367 145342 145357 145352 145388 145363 145370
145369 145356 145363 145373 145356 145378 145366 145370 145374 145361 145331 145332 145325 145347 145374
145380 145365 145376 145374 145381 145374 145366 145341 145381 145338 145350 145330 145371 145358 145369
145379 145373 145383 145365 145365 145370 145378 145354 145351 145338 145334 145333 145370 145358 145379
145368 145376 145382 145378 145372 145370 145365 145354 145360 145363 145334 145325 145335 145358 145372
145364 145377 145379 145365 145384 145368 145376 145370 145364 145364 145336 145357 145355 145344 145340
145373 145380 145390 145377 145383 145367 145350 145374 145373 145337 145335 145253 145341 145346 145351
145375 145372 145385 145369 145381 145380 145364 145337 145367 145362 145346 145332 145348 145348 145375
145382 145370 145376 145373 145375 145372 145371 145345 145344 145337 145328 145329 145387 145357 145365
145373 145388 145363 145375 145386 145377 145367 145346 145367 145340 145331 145344 145333 145346 145370
145376 145369 145389 145352 145375 145366 145364 145340 145368 145361 145343 145366 145332 145365 145370
145391 145373 145378 145371 145379 145372 145347 145365 145373 145339 145339 145350 145366 145283 145351

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 145238 bytes 100%
1,000 145222 bytes -16 bytes 100%
10,000 145199 bytes -23 bytes 100%
100,000 145193 bytes -6 bytes 0.29%
1,000,000 145189 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
145331 bytes +142 bytes (+0.10%)
146043 bytes +854 bytes (+0.59%) +712 bytes
146018 bytes +829 bytes (+0.57%) +687 bytes
145848 bytes +659 bytes (+0.45%) +517 bytes
145661 bytes +472 bytes (+0.33%) +330 bytes
145650 bytes +461 bytes (+0.32%) +319 bytes
145587 bytes +398 bytes (+0.27%) +256 bytes
145567 bytes +378 bytes (+0.26%) +236 bytes
145572 bytes +383 bytes (+0.26%) +241 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 - but your browser doesn't support it.
Algorithm Program Parameters Size Compared To Best Zopfli
ZPAQ (Wikipedia) zpaq zpaq -method 69 98773 bytes -46416 bytes (-31.97%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 117386 bytes -27803 bytes (-19.15%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 117721 bytes -27468 bytes (-18.92%)
Brotli (Wikipedia) brotli brotli -q 11 123660 bytes -21529 bytes (-14.83%)
LZMA2 (Wikipedia) xz xz -9 124020 bytes -21169 bytes (-14.58%)
Zstandard (Wikipedia) zstd zstd -19 130472 bytes -14717 bytes (-10.14%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 131352 bytes -13837 bytes (-9.53%)

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.