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

After GZIP compression these minified files vary in size:
Boot
  119154 bytes (116.4k)
CDN
unpkg
  99779 bytes (97.4k)
CDN
cdnjs
  99735 bytes (97.4k)
CDN
gzip -6 (default)
  98782 bytes (96.5k)
local copy
gzip -9
  98394 bytes (96.1k)
local copy
libdeflate -12
  95348 bytes (93.1k)
local copy
7zip -mx=9 -tgzip
  95187 bytes (93.0k)
local copy
zultra
  95141 bytes (92.9k)
local copy
pigz -11 -n
  94873 bytes (92.6k)
local copy
kzip -s0 -rn -b0
  94862 bytes (92.6k)
local copy
Zopfli
  94778 bytes (92.6k)
local copy
Zopfli (defluff)
  94775 bytes (92.6k)
local copy

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

You will automatically get the smallest ThreeJS 54 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 4957 bytes by using my ThreeJS 54 Zopfli version instead of the best available CDN (5.23% smaller than cdnjs, 94778 vs. 99735 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 --bsr21 --lazy --ohh

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

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 119154 bytes 8bb1555736f69db3f59a20d363952a60 (invalid)
cdnjs 99735 bytes 8bb1555736f69db3f59a20d363952a60 (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
unpkg 99779 bytes 5dfe789bfd5f2219a356e1133f51f34c >
> var window = window || {};
> var self = self || {};
>
> // Export the THREE object for **Node.js**, with
> // backwards-compatibility for the old `require()` API. If [...]
> // the browser, add `_` as a global object via a string id [...]
> // for Closure Compiler "advanced" mode.
> if (typeof exports !== 'undefined') {
> if (typeof module !== 'undefined' && module.exports) {
[...]
July 11, 2016 @ 15:49

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
94778 bytes -6 bytes zopfli --i1000000 --mls256 --bsr21 --lazy --ohh February 16, 2017 @ 13:12
94784 bytes -6 bytes zopfli --i100000 --mls256 --bsr21 --lazy --ohh December 28, 2015 @ 16:15
94790 bytes -6 bytes zopfli --i10000 --mls256 --bsr21 --lazy --ohh November 16, 2015 @ 10:17
94796 bytes -9 bytes zopfli --i10000 --mls4096 --bsr19 --lazy --ohh November 16, 2015 @ 10:15
94805 bytes -23 bytes zopfli --i1000 --mls4096 --bsr19 --lazy --ohh November 16, 2015 @ 09:56
94828 bytes zopfli --i100 --mls4096 --bsr19 --lazy --ohh November 15, 2015 @ 11:11

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
94990 95004 94994 95000 94868 94949 94888 94951 95047 95133 95132 95049 95068 95047 95054
94918 94920 94926 94936 94885 94877 94840 94876 94876 94998 94995 94916 95008 94976 94966
94921 94958 94925 95076 94870 94922 94862 94924 94895 94969 94987 94810 94987 94967 94992
94904 95008 94925 95007 94893 94866 94976 94866 94884 94890 94983 94870 94957 94980 94986
94911 94964 94908 95007 94910 94871 94869 94876 94861 94972 94990 95033 94968 94972 95014
94904 95002 94909 94907 94910 94858 94871 94871 94865 94992 94997 94926 94971 94972 94969
94961 94903 94906 94860 94941 94873 94906 94871 94863 94884 94831 94826 94967 94967 94969
94891 95009 95019 94990 94976 94976 94976 94863 94866 94994 94909 94826 94969 94973 94980
94907 94904 94891 95019 94919 94974 94976 94980 94984 94979 94953 94897 94969 94964 94962
94926 95003 94909 95011 94859 94856 94855 94857 94860 94884 94972 94859 94964 94964 95019
94968 94958 94973 94918 94908 94862 94985 94863 94865 94969 94960 94887 94966 94978 95020
94910 95005 94908 95015 94861 94856 94907 94866 94868 94883 94997 94870 94965 94980 94988
95087 95053 94913 94904 94919 94988 94856 94979 94860 94886 94833 94814 94970 94965 94988
94888 94908 95010 95012 94911 94864 94977 94866 94870 94985 94897 94921 94979 94973 94967
94901 94899 95094 95005 94979 94866 94976 94976 94861 94857 94829 94870 94970 94970 94978
94976 94905 94907 94907 94906 94852 94886 94887 94853 94859 94968 94791 94986 94969 94970
94960 94954 94905 94908 94918 94862 94909 94902 94868 94871 94967 94876 94980 95004 94971
94889 94905 94997 95004 94876 94875 94865 94778 94883 94883 94966 94868 94971 94960 94970
94967 95054 94971 94906 94909 94956 94916 94978 94867 94970 94890 94889 94985 94972 94988
94908 95002 95020 94998 94864 94976 94906 94872 94872 94888 94831 94825 94970 94982 94980
94907 94909 94909 95009 94908 94868 94908 94978 94863 94991 94995 94868 94969 94971 94970
94962 94910 95010 94913 94910 94977 94977 94982 94859 94870 94799 94864 94966 94977 94967
94910 94924 95021 94908 94908 94991 94978 94873 94865 94866 94969 94814 94972 94967 95005

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 94828 bytes 100%
1,000 94805 bytes -23 bytes 100%
10,000 94790 bytes -15 bytes 100%
100,000 94784 bytes -6 bytes 0.58%
1,000,000 94778 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
94862 bytes +84 bytes (+0.09%)
95286 bytes +508 bytes (+0.54%) +424 bytes
95169 bytes +391 bytes (+0.41%) +307 bytes
95161 bytes +383 bytes (+0.40%) +299 bytes
95102 bytes +324 bytes (+0.34%) +240 bytes
95049 bytes +271 bytes (+0.29%) +187 bytes
95065 bytes +287 bytes (+0.30%) +203 bytes
95012 bytes +234 bytes (+0.25%) +150 bytes
95019 bytes +241 bytes (+0.25%) +157 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 64553 bytes -30225 bytes (-31.89%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 74767 bytes -20011 bytes (-21.11%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 79454 bytes -15324 bytes (-16.17%)
Brotli (Wikipedia) brotli brotli -q 11 79993 bytes -14785 bytes (-15.60%)
LZMA2 (Wikipedia) xz xz -9 80504 bytes -14274 bytes (-15.06%)
Zstandard (Wikipedia) zstd zstd -19 85928 bytes -8850 bytes (-9.34%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 87410 bytes -7368 bytes (-7.77%)

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.