Choose a version:
49% The original file has 807316 bytes (788.4k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 392908 bytes (383.7k, 49%).

After GZIP compression these minified files vary in size:
Boot
  115546 bytes (112.8k)
CDN
cdnjs
  97121 bytes (94.8k)
CDN
gzip -6 (default)
  96127 bytes (93.9k)
local copy
gzip -9
  95749 bytes (93.5k)
local copy
libdeflate -12
  92843 bytes (90.7k)
local copy
7zip -mx=9 -tgzip
  92748 bytes (90.6k)
local copy
zultra
  92655 bytes (90.5k)
local copy
pigz -11 -n
  92491 bytes (90.3k)
local copy
kzip -s0 -rn -b8
  92475 bytes (90.3k)
local copy
Zopfli
  92392 bytes (90.2k)
local copy
Zopfli (defluff)
  92389 bytes (90.2k)
local copy

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

You will automatically get the smallest ThreeJS 53 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 4729 bytes by using my ThreeJS 53 Zopfli version instead of the best available CDN (5.12% smaller than cdnjs, 92392 vs. 97121 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 --mls256 --bsr25 --lazy --ohh

(found February 16, 2017)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 256  --mls256
block splitting recursion 25  --bsr25
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 (92389 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/r53/build/three.min.js --location | md5sum
77139666a0b6052e25e641be36047712  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r53.min.zopfli.js.gz | md5sum
77139666a0b6052e25e641be36047712  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 115546 bytes 77139666a0b6052e25e641be36047712 (invalid)
cdnjs 97121 bytes 77139666a0b6052e25e641be36047712 (invalid)

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
92392 bytes -6 bytes zopfli --i1000000 --mls256 --bsr25 --lazy --ohh February 16, 2017 @ 17:22
92398 bytes -9 bytes zopfli --i100000 --mls256 --bsr25 --lazy --ohh December 22, 2015 @ 20:06
92407 bytes -3 bytes zopfli --i10000 --mls256 --bsr25 --lazy --ohh November 17, 2015 @ 01:22
92410 bytes -2 bytes zopfli --i10000 --mls256 --bsr23 --lazy --ohh November 16, 2015 @ 10:30
92412 bytes -22 bytes zopfli --i1000 --mls256 --bsr25 --lazy --ohh November 16, 2015 @ 09:37
92434 bytes zopfli --i100 --mls256 --bsr25 --lazy --ohh November 15, 2015 @ 12:25

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

Most recent activity on July 20, 2020 @ 12:47.

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
92552 92515 92530 92580 92501 92541 92554 92582 92588 92584 92582 92580 92584 92583 92573
92526 92517 92520 92462 92461 92467 92507 92569 92555 92558 92448 92572 92482 92565 92555
92532 92541 92544 92481 92515 92537 92523 92478 92535 92526 92532 92525 92438 92555 92572
92480 92533 92453 92505 92478 92429 92433 92412 92550 92559 92547 92533 92583 92563 92551
92492 92525 92577 92565 92513 92530 92480 92439 92485 92572 92426 92449 92480 92573 92552
92444 92459 92539 92488 92484 92438 92438 92412 92573 92567 92435 92508 92501 92554 92552
92526 92529 92529 92471 92496 92481 92427 92426 92561 92566 92420 92444 92525 92553 92576
92471 92490 92498 92487 92483 92426 92424 92432 92425 92504 92439 92542 92443 92573 92575
92418 92490 92518 92477 92495 92477 92474 92420 92480 92572 92423 92451 92446 92572 92582
92496 92522 92425 92422 92447 92460 92430 92418 92539 92422 92431 92440 92515 92570 92569
92519 92485 92484 92466 92488 92479 92429 92426 92424 92422 92447 92443 92474 92555 92569
92479 92495 92513 92469 92419 92435 92419 92432 92422 92430 92449 92442 92534 92572 92559
92484 92486 92486 92522 92481 92487 92488 92475 92423 92563 92432 92444 92427 92557 92556
92479 92447 92444 92474 92423 92429 92431 92434 92563 92573 92427 92448 92424 92558 92575
92546 92519 92497 92478 92487 92435 92425 92430 92428 92428 92432 92420 92547 92555 92552
92467 92446 92536 92499 92428 92532 92427 92471 92426 92421 92437 92445 92439 92557 92569
92474 92520 92434 92471 92421 92474 92470 92414 92426 92558 92437 92447 92448 92570 92586
92496 92431 92444 92474 92442 92433 92422 92417 92425 92572 92432 92447 92479 92570 92567
92431 92530 92494 92495 92453 92436 92433 92433 92569 92563 92436 92456 92437 92570 92566
92471 92518 92475 92473 92425 92439 92434 92402 92423 92427 92449 92489 92510 92570 92578
92469 92492 92472 92433 92430 92425 92424 92392 92424 92426 92440 92452 92440 92570 92566
92474 92496 92432 92495 92429 92436 92418 92428 92428 92425 92440 92447 92427 92570 92575
92474 92487 92551 92485 92424 92469 92429 92426 92423 92561 92441 92489 92453 92563 92569

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 92434 bytes 100%
1,000 92412 bytes -22 bytes 100%
10,000 92407 bytes -5 bytes 100%
100,000 92398 bytes -9 bytes 0.58%
1,000,000 92392 bytes -6 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
92485 bytes +93 bytes (+0.10%) +10 bytes
92694 bytes +302 bytes (+0.33%) +219 bytes
92681 bytes +289 bytes (+0.31%) +206 bytes
92630 bytes +238 bytes (+0.26%) +155 bytes
92613 bytes +221 bytes (+0.24%) +138 bytes
92514 bytes +122 bytes (+0.13%) +39 bytes
92504 bytes +112 bytes (+0.12%) +29 bytes
92491 bytes +99 bytes (+0.11%) +16 bytes
92475 bytes +83 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 62884 bytes -29508 bytes (-31.94%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 72772 bytes -19620 bytes (-21.24%)
Brotli (Wikipedia) brotli brotli -q 11 77763 bytes -14629 bytes (-15.83%)
LZMA2 (Wikipedia) xz xz -9 78224 bytes -14168 bytes (-15.33%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 78405 bytes -13987 bytes (-15.14%)
Zstandard (Wikipedia) zstd zstd -19 83529 bytes -8863 bytes (-9.59%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 84518 bytes -7874 bytes (-8.52%)

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.