Choose a version:
53% The original file has 963665 bytes (941.1k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 507856 bytes (496.0k, 53%).

After GZIP compression these minified files vary in size:
Boot
  145040 bytes (141.6k)
CDN
cdnjs
  120096 bytes (117.3k)
CDN
gzip -6 (default)
  118775 bytes (116.0k)
local copy
Google
  118700 bytes (115.9k)
CDN
gzip -9
  118341 bytes (115.6k)
local copy
libdeflate -12
  114099 bytes (111.4k)
local copy
zultra
  114092 bytes (111.4k)
local copy
7zip -mx=9 -tgzip
  114019 bytes (111.3k)
local copy
kzip -s0 -rn -b0
  113762 bytes (111.1k)
local copy
pigz -11 -n
  113742 bytes (111.1k)
local copy
Zopfli
  113709 bytes (111.0k)
local copy
Zopfli (defluff)
  113707 bytes (111.0k)
local copy

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

You will automatically get the smallest ThreeJS 76 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 4991 bytes by using my ThreeJS 76 Zopfli version instead of the best available CDN (4.39% smaller than Google, 113709 vs. 118700 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 --bsr23 --lazy --ohh

(found April 21, 2016)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 512  --mls512
block splitting recursion 23  --bsr23
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 (113707 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/r76/build/three.min.js --location | md5sum
f2ebefe8cfc5d30ec6d01bdfde67de44  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r76.min.zopfli.js.gz | md5sum
f2ebefe8cfc5d30ec6d01bdfde67de44  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 145040 bytes f2ebefe8cfc5d30ec6d01bdfde67de44 May 6, 2016 @ 13:25
cdnjs 120096 bytes f2ebefe8cfc5d30ec6d01bdfde67de44 April 20, 2016 @ 09:01
Google 118700 bytes f2ebefe8cfc5d30ec6d01bdfde67de44 May 13, 2016 @ 20:29

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
113709 bytes -4 bytes zopfli --i1000000 --mls512 --bsr23 --lazy --ohh April 21, 2016 @ 19:16
113713 bytes -9 bytes zopfli --i100000 --mls512 --bsr23 --lazy --ohh April 20, 2016 @ 10:21
113722 bytes -16 bytes zopfli --i10000 --mls512 --bsr23 --lazy --ohh April 20, 2016 @ 07:02
113738 bytes -4 bytes zopfli --i10000 --mls2048 --bsr15 --lazy --ohh April 20, 2016 @ 06:44
113742 bytes -9 bytes zopfli --i1000 --mls512 --bsr23 --lazy --ohh April 20, 2016 @ 06:33
113751 bytes -12 bytes zopfli --i1000 --mls2048 --bsr15 --lazy --ohh April 20, 2016 @ 06:25
113763 bytes zopfli --i100 --mls2048 --bsr15 --lazy --ohh April 20, 2016 @ 06:14

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

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
113876 114009 113919 114011 114016 114014 113898 113873 114018 113813 113845 113874 113835 113919 113907
113799 113797 113776 113784 113784 113786 113826 113782 113785 113786 113785 113788 113784 113798 113880
113763 113770 113773 113876 113885 113895 113879 113814 113783 113746 113769 113769 113774 113769 113844
113810 113764 113771 113762 113755 113811 113756 113748 113768 113801 113801 113766 113762 113771 113777
113761 113760 113754 113759 113772 113760 113765 113746 113742 113745 113758 113759 113760 113803 113816
113876 113880 113894 113875 113901 113908 113862 113863 113859 113876 113773 113750 113771 113800 113781
113778 113785 113740 113874 113866 113893 113882 113800 113784 113743 113817 113745 113760 113769 113784
113783 113769 113776 113899 113892 113890 113874 113767 113774 113769 113769 113776 113759 113770 113836
113780 113777 113767 113755 113770 113757 113780 113751 113751 113753 113780 113749 113759 113749 113848
113812 113756 113765 113768 113764 113771 113777 113755 113777 113781 113785 113776 113762 113769 113818
113764 113773 113763 113762 113775 113772 113806 113771 113763 113772 113775 113768 113758 113771 113759
113773 113769 113765 113791 113749 113806 113799 113750 113756 113819 113738 113764 113766 113767 113776
113780 113783 113779 113798 113790 113794 113791 113776 113786 113766 113781 113744 113751 113757 113831
113767 113758 113753 113756 113763 113765 113725 113769 113759 113806 113764 113770 113770 113802 113806
113775 113776 113751 113761 113771 113763 113773 113763 113781 113769 113768 113765 113764 113800 113826
113764 113770 113756 113764 113765 113773 113766 113763 113758 113767 113784 113756 113765 113776 113822
113755 113767 113861 113884 113858 113872 113877 113753 113773 113739 113775 113758 113763 113776 113814
113759 113766 113884 113885 113854 113874 113896 113869 113888 113738 113763 113746 113760 113776 113828
113763 113758 113900 113885 113863 113888 113864 113752 113750 113759 113757 113745 113763 113770 113802
113749 113750 113768 113879 113894 113892 113884 113747 113709 113758 113789 113742 113751 113773 113779
113771 113765 113763 113763 113873 113760 113763 113758 113739 113753 113773 113745 113759 113754 113775
113763 113772 113767 113762 113759 113802 113781 113749 113752 113755 113740 113757 113762 113757 113783
113762 113764 113765 113764 113763 113769 113761 113741 113768 113743 113769 113772 113762 113764 113791

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 113763 bytes 100%
1,000 113742 bytes -21 bytes 100%
10,000 113722 bytes -20 bytes 100%
100,000 113713 bytes -9 bytes 0.58%
1,000,000 113709 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
113762 bytes +53 bytes (+0.05%)
114317 bytes +608 bytes (+0.53%) +555 bytes
114283 bytes +574 bytes (+0.50%) +521 bytes
114175 bytes +466 bytes (+0.41%) +413 bytes
114040 bytes +331 bytes (+0.29%) +278 bytes
113951 bytes +242 bytes (+0.21%) +189 bytes
113982 bytes +273 bytes (+0.24%) +220 bytes
113839 bytes +130 bytes (+0.11%) +77 bytes
113797 bytes +88 bytes (+0.08%) +35 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 77277 bytes -36432 bytes (-32.04%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 88829 bytes -24880 bytes (-21.88%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 93637 bytes -20072 bytes (-17.65%)
Brotli (Wikipedia) brotli brotli -q 11 98923 bytes -14786 bytes (-13.00%)
LZMA2 (Wikipedia) xz xz -9 99684 bytes -14025 bytes (-12.33%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 102925 bytes -10784 bytes (-9.48%)
Zstandard (Wikipedia) zstd zstd -19 105269 bytes -8440 bytes (-7.42%)

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.