Choose a version:
50% The original file has 841076 bytes (821.4k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 422285 bytes (412.4k, 50%).

After GZIP compression these minified files vary in size:
Boot
  121365 bytes (118.5k)
CDN
cdnjs
  101117 bytes (98.7k)
CDN
gzip -6 (default)
  100142 bytes (97.8k)
local copy
gzip -9
  99707 bytes (97.4k)
local copy
libdeflate -12
  96460 bytes (94.2k)
local copy
zultra
  96339 bytes (94.1k)
local copy
7zip -mx=9 -tgzip
  96257 bytes (94.0k)
local copy
pigz -11 -n
  95947 bytes (93.7k)
local copy
kzip -s0 -rn -b0
  95900 bytes (93.7k)
local copy
Zopfli
  95812 bytes (93.6k)
local copy
Zopfli (defluff)
  95809 bytes (93.6k)
local copy

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

You will automatically get the smallest ThreeJS 59 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 5305 bytes by using my ThreeJS 59 Zopfli version instead of the best available CDN (5.54% smaller than cdnjs, 95812 vs. 101117 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 --mls8192 --bsr10 --lazy --ohh

(found February 9, 2017)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 8192  --mls8192
block splitting recursion 10  --bsr10
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 (95809 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/r59/build/three.min.js --location | md5sum
fa30c3b3013e78484d444d6fc94cd9c1  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r59.min.zopfli.js.gz | md5sum
fa30c3b3013e78484d444d6fc94cd9c1  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 121365 bytes fa30c3b3013e78484d444d6fc94cd9c1 (invalid)
cdnjs 101117 bytes fa30c3b3013e78484d444d6fc94cd9c1 (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
95812 bytes -2 bytes zopfli --i1000000 --mls8192 --bsr10 --lazy --ohh February 9, 2017 @ 10:52
95814 bytes -6 bytes zopfli --i100000 --mls8192 --bsr10 --lazy --ohh December 28, 2015 @ 17:21
95820 bytes -8 bytes zopfli --i10000 --mls8192 --bsr10 --lazy --ohh November 15, 2015 @ 20:50
95828 bytes -6 bytes zopfli --i10000 --mls8192 --bsr14 --lazy --ohh November 15, 2015 @ 20:19
95834 bytes -2 bytes zopfli --i1000 --mls8192 --bsr10 --lazy --ohh November 15, 2015 @ 15:07
95836 bytes -1 byte zopfli --i1000 --mls8192 --bsr14 --lazy --ohh November 15, 2015 @ 15:07
95837 bytes -2 bytes zopfli --i1000 --mls8192 --bsr7 --lazy --ohh November 15, 2015 @ 15:05
95839 bytes -13 bytes zopfli --i1000 --mls8192 --bsr17 --lazy --ohh November 15, 2015 @ 15:04
95852 bytes zopfli --i100 --mls8192 --bsr14 --lazy --ohh November 15, 2015 @ 10:35

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
95989 95986 95987 95990 95985 95986 95978 95984 95983 96039 96002 95964 95992 95978 96136
95920 95974 95966 95970 95936 95943 95948 95952 95962 95913 96100 96111 95842 95908 96110
95969 95914 95934 95955 96084 96080 95935 95932 96075 95910 96129 96115 96060 96001 96117
96058 95968 95963 95909 95939 95958 95939 95952 95915 95906 95986 95966 95832 95969 96114
95975 95967 95975 95942 95901 95906 95899 95901 95956 95886 95888 95898 95909 95908 96115
95970 95937 95929 95932 95936 95967 95940 95901 95913 95842 95898 95957 95831 95970 96113
95969 95970 96051 95971 95891 95956 95902 95937 95935 95907 95973 95878 95812 95993 96113
95964 95974 95936 95963 95908 95956 95963 95907 95902 95912 95960 95961 95918 95963 96135
95941 95955 95936 96027 95954 95940 95964 95902 95907 95901 95972 95962 95912 95973 96126
95974 95966 95939 95931 95903 95902 95904 95904 95898 95981 95965 95968 95909 95978 96114
95967 96051 95958 96039 95954 95955 95958 95953 95962 95894 95904 95970 95817 95967 96117
95929 96013 95945 95907 95931 95941 95898 95899 95901 95899 95952 95961 95912 95974 96117
95968 95966 95932 95936 96028 96027 95901 95899 95966 95898 95957 95969 95919 95976 96117
96059 95957 95956 96039 95956 95939 95958 95937 95958 95902 95965 95957 95829 95902 95947
95971 95965 95962 95936 95912 95946 95901 95899 95960 95891 95910 95914 95907 95964 96116
95903 95942 95931 95935 95937 95939 95898 95941 95942 95964 95914 95962 95881 95924 95966
95964 95936 95969 96032 95933 95935 95960 95928 95957 95908 95961 95960 95918 95969 96127
95891 95958 95955 95938 95932 95928 95893 95913 96021 95907 95975 95957 95911 95976 96118
95959 95957 95975 95933 95956 95957 95890 95937 95889 95897 95968 95885 95911 95898 96118
95901 95953 95956 95943 96014 95960 95890 95903 95963 95893 95964 95964 95896 95973 96118
95928 95963 96025 95939 95959 95956 95901 95898 95966 95906 95909 95964 95913 95901 95953
95970 95966 95963 96030 96032 95962 95902 95899 95960 95916 95967 95973 95919 95917 96112
95965 95961 95934 95935 95937 95929 95929 95899 95901 95844 95963 95969 95913 95962 96116

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 95852 bytes 100%
1,000 95834 bytes -18 bytes 100%
10,000 95820 bytes -14 bytes 100%
100,000 95814 bytes -6 bytes 0.58%
1,000,000 95812 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
95900 bytes +88 bytes (+0.09%)
96395 bytes +583 bytes (+0.61%) +495 bytes
96372 bytes +560 bytes (+0.58%) +472 bytes
96228 bytes +416 bytes (+0.43%) +328 bytes
96139 bytes +327 bytes (+0.34%) +239 bytes
96115 bytes +303 bytes (+0.32%) +215 bytes
96118 bytes +306 bytes (+0.32%) +218 bytes
96085 bytes +273 bytes (+0.28%) +185 bytes
96110 bytes +298 bytes (+0.31%) +210 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 65667 bytes -30145 bytes (-31.46%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 75727 bytes -20085 bytes (-20.96%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 79529 bytes -16283 bytes (-16.99%)
Brotli (Wikipedia) brotli brotli -q 11 81602 bytes -14210 bytes (-14.83%)
LZMA2 (Wikipedia) xz xz -9 82236 bytes -13576 bytes (-14.17%)
Zstandard (Wikipedia) zstd zstd -19 87616 bytes -8196 bytes (-8.55%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 88647 bytes -7165 bytes (-7.48%)

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.