Choose a version:
49% The original file has 1035327 bytes (1,011.1k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 504438 bytes (492.6k, 49%).

After GZIP compression these minified files vary in size:
Boot
  155224 bytes (151.6k)
CDN
cdnjs
  130518 bytes (127.5k)
CDN
unpkg
  129323 bytes (126.3k)
CDN
Google
  129219 bytes (126.2k)
CDN
gzip -6 (default)
  129206 bytes (126.2k)
local copy
jsdelivr
  129105 bytes (126.1k)
CDN
gzip -9
  128773 bytes (125.8k)
local copy
libdeflate -12
  124410 bytes (121.5k)
local copy
7zip -mx=9 -tgzip
  124352 bytes (121.4k)
local copy
zultra
  124159 bytes (121.2k)
local copy
pigz -11 -n
  123929 bytes (121.0k)
local copy
kzip -s0 -rn -b0
  123916 bytes (121.0k)
local copy
Zopfli
  123860 bytes (121.0k)
local copy
Zopfli (defluff)
  123855 bytes (121.0k)
local copy

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

You will automatically get the smallest ThreeJS 83 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 5245 bytes by using my ThreeJS 83 Zopfli version instead of the best available CDN (4.23% smaller than jsdelivr, 123860 vs. 129105 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 --bsr17 --lazy --ohh

(found December 17, 2016)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 512  --mls512
block splitting recursion 17  --bsr17
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 5 more bytes (123855 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/r83/build/three.min.js --location | md5sum
7833152281cd443c0e746bb5e56283eb  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r83.min.zopfli.js.gz | md5sum
7833152281cd443c0e746bb5e56283eb  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 155224 bytes 7833152281cd443c0e746bb5e56283eb December 18, 2016 @ 12:31
cdnjs 130518 bytes 7833152281cd443c0e746bb5e56283eb (invalid)
unpkg 129323 bytes 7833152281cd443c0e746bb5e56283eb December 15, 2016 @ 10:20
Google 129219 bytes 7833152281cd443c0e746bb5e56283eb December 20, 2016 @ 14:06
jsdelivr 129105 bytes 7833152281cd443c0e746bb5e56283eb February 19, 2018 @ 16:22

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
123860 bytes -2 bytes zopfli --i1000000 --mls512 --bsr17 --lazy --ohh December 17, 2016 @ 12:08
123862 bytes -8 bytes zopfli --i100000 --mls512 --bsr17 --lazy --ohh December 15, 2016 @ 14:22
123870 bytes -9 bytes zopfli --i10000 --mls512 --bsr17 --lazy --ohh December 15, 2016 @ 11:03
123879 bytes -24 bytes zopfli --i1000 --mls512 --bsr17 --lazy --ohh December 15, 2016 @ 10:42
123903 bytes zopfli --i100 --mls512 --bsr17 --lazy --ohh December 15, 2016 @ 10:26

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
124058 124062 124015 124084 124068 124116 124094 124096 124080 124101 124064 124063 124168 124128 124036
124005 124028 123972 123975 123967 124015 124123 123947 124106 123969 124030 124030 123926 123987 123942
123968 123994 123949 123956 124006 124006 123960 123978 123963 123914 123930 124095 123961 123971 124024
123957 123958 123989 123955 123955 123937 124017 123904 123885 124027 124009 123965 123946 123968 123936
123953 123945 123961 123964 123962 123971 124117 123920 123891 123967 123943 123966 123960 123916 123945
123950 123950 123951 123988 123927 123992 123954 123908 123958 123912 123990 124012 123965 123925 124025
123944 123941 123943 123954 123956 123954 123974 123978 123955 124011 124008 123955 123962 123924 123950
123954 123951 123991 123961 123955 123991 123981 123905 123896 124010 124021 123962 123916 123973 123938
123942 123956 123937 123976 123953 123970 123976 123902 123876 124037 124020 123969 123883 123988 123996
123946 123948 123987 123976 123956 123975 123993 123903 123992 123907 123868 123961 123874 123980 123914
123953 123959 123984 123956 123952 123970 123981 123902 123911 123928 123994 123955 123954 123983 124092
123956 123961 123987 123971 123954 123944 124101 123900 123903 124007 124008 123954 123992 123910 123949
123949 123950 123952 123965 123961 123943 123990 123883 123906 124017 124006 123984 123950 124036 123944
123955 123957 123989 123978 123972 123947 123988 123902 123860 123916 123927 123971 123887 123934 123979
123949 123947 123995 123964 123961 123970 123969 123899 123868 123918 123975 123991 123889 124032 124064
123945 123959 123986 123967 123989 123958 123964 123905 123871 123915 123924 123953 123884 123883 123965
123951 123948 123985 123954 123957 123951 123983 123898 123884 124007 124016 123957 123976 124046 123959
123947 123953 123926 123963 123953 123980 123964 123907 123903 123962 123933 123930 123889 123955 124074
123939 123949 123954 123957 124038 124017 123992 123906 123873 123915 123979 123918 124007 124033 123954
123945 123952 123947 123969 123957 123985 123982 123900 123866 124008 124006 123966 123920 123947 123953
123944 123949 123947 123971 124019 123957 124019 123938 123885 124008 124014 123993 123937 123963 124099
123951 123949 123986 123955 123959 124017 123988 123968 123890 123916 124013 123955 123989 123962 123962
123949 123957 123991 123988 123955 123963 123963 123905 123906 124003 123936 123969 123925 123963 123957

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 123903 bytes 100%
1,000 123879 bytes -24 bytes 100%
10,000 123870 bytes -9 bytes 100%
100,000 123862 bytes -8 bytes 2.32%
1,000,000 123860 bytes -2 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
123916 bytes +56 bytes (+0.05%)
124485 bytes +625 bytes (+0.50%) +569 bytes
124474 bytes +614 bytes (+0.50%) +558 bytes
124294 bytes +434 bytes (+0.35%) +378 bytes
124261 bytes +401 bytes (+0.32%) +345 bytes
124091 bytes +231 bytes (+0.19%) +175 bytes
124116 bytes +256 bytes (+0.21%) +200 bytes
124056 bytes +196 bytes (+0.16%) +140 bytes
124022 bytes +162 bytes (+0.13%) +106 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 84100 bytes -39760 bytes (-32.10%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 96772 bytes -27088 bytes (-21.87%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 103081 bytes -20779 bytes (-16.78%)
Brotli (Wikipedia) brotli brotli -q 11 105860 bytes -18000 bytes (-14.53%)
LZMA2 (Wikipedia) xz xz -9 106588 bytes -17272 bytes (-13.94%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 111078 bytes -12782 bytes (-10.32%)
Zstandard (Wikipedia) zstd zstd -19 112778 bytes -11082 bytes (-8.95%)

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.