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

After GZIP compression these minified files vary in size:
unpkg
  222206 bytes (217.0k)
CDN
gzip -6 (default)
  151747 bytes (148.2k)
local copy
jsdelivr
  151660 bytes (148.1k)
CDN
gzip -9
  151270 bytes (147.7k)
local copy
libdeflate -12
  146071 bytes (142.6k)
local copy
7zip -mx=9 -tgzip
  145696 bytes (142.3k)
local copy
zultra
  145676 bytes (142.3k)
local copy
kzip -s0 -rn -b0
  145409 bytes (142.0k)
local copy
Zopfli
  145261 bytes (141.9k)
local copy
pigz -11 -n
  145259 bytes (141.9k)
local copy

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

You will automatically get the smallest ThreeJS 145 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 6399 bytes by using my ThreeJS 145 Zopfli version instead of the best available CDN (4.41% smaller than jsdelivr, 145261 vs. 151660 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 --mls16384 --bsr11 --lazy --ohh

(found January 10, 2023)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 16384  --mls16384
block splitting recursion 11  --bsr11
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 (145259 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/r145/build/three.min.js --location | md5sum
289ad750188a44fb4cb38c896b4e847e  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r145.min.zopfli.js.gz | md5sum
289ad750188a44fb4cb38c896b4e847e  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 222206 bytes 289ad750188a44fb4cb38c896b4e847e (invalid)
jsdelivr 151660 bytes 289ad750188a44fb4cb38c896b4e847e January 3, 2023 @ 16:20

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
145261 bytes -5 bytes zopfli --i1000000 --mls16384 --bsr11 --lazy --ohh January 10, 2023 @ 13:01
145266 bytes -10 bytes zopfli --i100000 --mls16384 --bsr11 --lazy --ohh January 6, 2023 @ 15:37
145276 bytes -20 bytes zopfli --i10000 --mls16384 --bsr11 --lazy --ohh January 5, 2023 @ 07:25
145296 bytes -1 byte zopfli --i1000 --mls8192 --bsr6 --lazy --ohh January 4, 2023 @ 03:59
145297 bytes -26 bytes zopfli --i1000 --mls16384 --bsr11 --lazy --ohh January 4, 2023 @ 02:45
145323 bytes -1 byte zopfli --i1000 --mls8192 --bsr4 --lazy --ohh January 4, 2023 @ 00:49
145324 bytes zopfli --i100 --mls8192 --bsr6 --lazy --ohh January 3, 2023 @ 17:27

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

Most recent activity on January 10, 2023 @ 14:41.

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
145540 145533 145524 145519 145471 145495 145497 145508 145510 145490 145457 145444 145349 145371 145533
145405 145459 145473 145448 145436 145448 145440 145453 145436 145449 145443 145334 145306 145429 145453
145412 145429 145427 145444 145426 145436 145443 145419 145415 145414 145394 145284 145277 145414 145429
145461 145440 145437 145403 145434 145491 145400 145477 145404 145425 145423 145419 145425 145448 145430
145451 145443 145457 145434 145450 145449 145457 145420 145429 145434 145410 145415 145426 145440 145429
145441 145419 145416 145424 145450 145407 145407 145429 145397 145408 145429 145403 145414 145316 145430
145435 145464 145466 145421 145469 145454 145430 145461 145468 145571 145385 145321 145414 145362 145451
145437 145452 145441 145429 145450 145446 145415 145433 145428 145407 145405 145415 145399 145261 145428
145434 145427 145424 145411 145440 145415 145404 145417 145399 145402 145398 145401 145409 145418 145443
145431 145418 145420 145422 145425 145424 145404 145424 145430 145423 145429 145453 145458 145415 145457
145440 145467 145421 145426 145438 145433 145408 145421 145425 145403 145396 145418 145431 145316 145466
145423 145454 145443 145440 145422 145401 145409 145429 145419 145406 145408 145425 145417 145409 145453
145433 145448 145419 145422 145443 145431 145435 145420 145413 145395 145399 145403 145432 145412 145465
145441 145424 145434 145428 145433 145404 145442 145450 145435 145396 145413 145412 145416 145403 145434
145432 145429 145438 145438 145424 145412 145433 145411 145430 145408 145400 145401 145441 145418 145452
145435 145446 145432 145439 145436 145403 145403 145402 145399 145398 145396 145427 145429 145415 145447
145439 145443 145435 145409 145441 145397 145443 145432 145417 145404 145404 145385 145320 145418 145419
145437 145446 145435 145433 145445 145405 145402 145404 145415 145399 145406 145316 145405 145414 145418
145440 145445 145432 145427 145434 145426 145412 145415 145405 145396 145409 145397 145391 145410 145439
145435 145436 145435 145418 145434 145398 145431 145413 145420 145406 145406 145418 145390 145423 145457
145441 145465 145412 145430 145433 145401 145421 145416 145425 145399 145405 145416 145406 145419 145440
145437 145425 145418 145431 145447 145400 145397 145402 145428 145420 145406 145400 145409 145421 145461
145430 145445 145437 145404 145434 145403 145419 145402 145410 145399 145413 145417 145438 145354 145414

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 145324 bytes 100%
1,000 145296 bytes -28 bytes 100%
10,000 145276 bytes -20 bytes 100%
100,000 145266 bytes -10 bytes 0.29%
1,000,000 145261 bytes -5 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
145409 bytes +148 bytes (+0.10%)
146124 bytes +863 bytes (+0.59%) +715 bytes
146062 bytes +801 bytes (+0.55%) +653 bytes
145913 bytes +652 bytes (+0.45%) +504 bytes
145751 bytes +490 bytes (+0.34%) +342 bytes
145752 bytes +491 bytes (+0.34%) +343 bytes
145671 bytes +410 bytes (+0.28%) +262 bytes
145641 bytes +380 bytes (+0.26%) +232 bytes
145635 bytes +374 bytes (+0.26%) +226 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 98864 bytes -46397 bytes (-31.94%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 117407 bytes -27854 bytes (-19.18%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 117779 bytes -27482 bytes (-18.92%)
Brotli (Wikipedia) brotli brotli -q 11 123583 bytes -21678 bytes (-14.92%)
LZMA2 (Wikipedia) xz xz -9 124072 bytes -21189 bytes (-14.59%)
Zstandard (Wikipedia) zstd zstd -19 130525 bytes -14736 bytes (-10.14%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 131524 bytes -13737 bytes (-9.46%)

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.