Choose a version:
52% The original file has 973098 bytes (950.3k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 510802 bytes (498.8k, 52%).

After GZIP compression these minified files vary in size:
Boot
  146925 bytes (143.5k)
CDN
cdnjs
  121976 bytes (119.1k)
CDN
gzip -6 (default)
  120659 bytes (117.8k)
local copy
unpkg
  120627 bytes (117.8k)
CDN
Google
  120552 bytes (117.7k)
CDN
jsdelivr
  120495 bytes (117.7k)
CDN
gzip -9
  120206 bytes (117.4k)
local copy
libdeflate -12
  116022 bytes (113.3k)
local copy
zultra
  115862 bytes (113.1k)
local copy
7zip -mx=9 -tgzip
  115860 bytes (113.1k)
local copy
pigz -11 -n
  115557 bytes (112.8k)
local copy
kzip -s0 -rn -b0
  115531 bytes (112.8k)
local copy
Zopfli
  115485 bytes (112.8k)
local copy
Zopfli (defluff)
  115483 bytes (112.8k)
local copy

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

You will automatically get the smallest ThreeJS 78 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 5010 bytes by using my ThreeJS 78 Zopfli version instead of the best available CDN (4.34% smaller than jsdelivr, 115485 vs. 120495 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 --mls512 --bsr16 --lazy --ohh

(found June 17, 2016)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 512  --mls512
block splitting recursion 16  --bsr16
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 (115483 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/r78/build/three.min.js --location | md5sum
adb00887eb4cea97773ebe529bd5f0b6  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r78.min.zopfli.js.gz | md5sum
adb00887eb4cea97773ebe529bd5f0b6  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 146925 bytes adb00887eb4cea97773ebe529bd5f0b6 June 16, 2016 @ 18:14
cdnjs 121976 bytes adb00887eb4cea97773ebe529bd5f0b6 June 15, 2016 @ 12:31
unpkg 120627 bytes adb00887eb4cea97773ebe529bd5f0b6 July 11, 2016 @ 15:46
Google 120552 bytes adb00887eb4cea97773ebe529bd5f0b6 December 20, 2016 @ 14:06
jsdelivr 120495 bytes adb00887eb4cea97773ebe529bd5f0b6 February 19, 2018 @ 16:23

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
115485 bytes -8 bytes zopfli --i1000000 --mls512 --bsr16 --lazy --ohh June 17, 2016 @ 01:13
115493 bytes -9 bytes zopfli --i100000 --mls512 --bsr16 --lazy --ohh June 15, 2016 @ 13:49
115502 bytes -11 bytes zopfli --i10000 --mls512 --bsr16 --lazy --ohh June 15, 2016 @ 10:46
115513 bytes -16 bytes zopfli --i1000 --mls512 --bsr16 --lazy --ohh June 15, 2016 @ 10:27
115529 bytes zopfli --i100 --mls512 --bsr16 --lazy --ohh June 15, 2016 @ 10:13

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:55.

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
115635 115638 115639 115663 115650 115646 115649 115639 115632 115602 115584 115628 115609 115590 115751
115570 115552 115585 115588 115681 115554 115667 115550 115544 115582 115595 115560 115601 115560 115638
115530 115541 115641 115631 115648 115651 115650 115652 115666 115553 115557 115557 115551 115548 115594
115546 115575 115539 115544 115566 115572 115533 115562 115535 115547 115546 115530 115531 115551 115534
115544 115551 115553 115512 115537 115544 115558 115547 115541 115529 115525 115549 115534 115550 115572
115655 115655 115657 115657 115661 115660 115659 115682 115648 115660 115544 115554 115535 115583 115606
115661 115659 115658 115620 115653 115673 115635 115641 115650 115565 115652 115541 115650 115554 115556
115651 115555 115654 115667 115666 115684 115667 115537 115545 115540 115543 115539 115529 115560 115540
115560 115561 115557 115546 115660 115550 115529 115526 115526 115527 115534 115540 115534 115531 115582
115552 115551 115535 115537 115548 115537 115533 115517 115547 115561 115519 115499 115530 115551 115619
115537 115553 115551 115547 115547 115549 115539 115533 115535 115543 115566 115534 115533 115527 115545
115546 115547 115548 115544 115551 115545 115550 115542 115530 115532 115542 115535 115531 115543 115532
115540 115547 115538 115570 115544 115574 115569 115551 115485 115546 115549 115537 115538 115540 115539
115551 115563 115550 115546 115551 115567 115532 115536 115530 115532 115530 115532 115535 115550 115576
115547 115542 115558 115552 115544 115553 115540 115520 115529 115541 115543 115540 115534 115539 115571
115545 115542 115540 115547 115549 115539 115553 115541 115532 115561 115543 115536 115532 115567 115564
115536 115547 115522 115537 115639 115539 115537 115536 115531 115546 115551 115534 115538 115550 115564
115537 115541 115660 115659 115661 115664 115663 115668 115495 115546 115534 115536 115526 115541 115559
115539 115542 115657 115655 115662 115666 115657 115660 115636 115548 115549 115535 115533 115553 115565
115651 115538 115652 115656 115665 115682 115650 115531 115534 115558 115543 115530 115535 115547 115585
115542 115542 115544 115540 115665 115537 115543 115531 115531 115549 115543 115539 115537 115553 115565
115530 115537 115531 115532 115546 115542 115534 115543 115532 115533 115541 115533 115538 115550 115569
115540 115541 115544 115539 115537 115536 115533 115531 115532 115519 115535 115533 115536 115530 115558

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 115529 bytes 100%
1,000 115513 bytes -16 bytes 100%
10,000 115502 bytes -11 bytes 100%
100,000 115493 bytes -9 bytes 0.87%
1,000,000 115485 bytes -8 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
115531 bytes +46 bytes (+0.04%)
116107 bytes +622 bytes (+0.54%) +576 bytes
116076 bytes +591 bytes (+0.51%) +545 bytes
115933 bytes +448 bytes (+0.39%) +402 bytes
115808 bytes +323 bytes (+0.28%) +277 bytes
115757 bytes +272 bytes (+0.24%) +226 bytes
115758 bytes +273 bytes (+0.24%) +227 bytes
115620 bytes +135 bytes (+0.12%) +89 bytes
115573 bytes +88 bytes (+0.08%) +42 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 78465 bytes -37020 bytes (-32.06%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 90017 bytes -25468 bytes (-22.05%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 94797 bytes -20688 bytes (-17.91%)
Brotli (Wikipedia) brotli brotli -q 11 100289 bytes -15196 bytes (-13.16%)
LZMA2 (Wikipedia) xz xz -9 101088 bytes -14397 bytes (-12.47%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 104134 bytes -11351 bytes (-9.83%)
Zstandard (Wikipedia) zstd zstd -19 106717 bytes -8768 bytes (-7.59%)

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.