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

After GZIP compression these minified files vary in size:
Boot
  117355 bytes (114.6k)
CDN
cdnjs
  98194 bytes (95.9k)
CDN
unpkg
  97957 bytes (95.7k)
CDN
gzip -6 (default)
  97216 bytes (94.9k)
local copy
gzip -9
  96770 bytes (94.5k)
local copy
libdeflate -12
  93558 bytes (91.4k)
local copy
zultra
  93438 bytes (91.2k)
local copy
7zip -mx=9 -tgzip
  93419 bytes (91.2k)
local copy
kzip -s0 -rn -b0
  93105 bytes (90.9k)
local copy
pigz -11 -n
  93025 bytes (90.8k)
local copy
Zopfli
  92932 bytes (90.8k)
local copy
Zopfli (defluff)
  92931 bytes (90.8k)
local copy

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

You will automatically get the smallest ThreeJS 56 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 5025 bytes by using my ThreeJS 56 Zopfli version instead of the best available CDN (5.41% smaller than unpkg, 92932 vs. 97957 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 --mls4096 --bsr23 --lazy --ohh

(found February 14, 2017)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 4096  --mls4096
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 1 more byte (92931 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/r56/build/three.min.js --location | md5sum
18eb03c97237a55687e8d79faee7e225  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r56.min.zopfli.js.gz | md5sum
18eb03c97237a55687e8d79faee7e225  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 117355 bytes 18eb03c97237a55687e8d79faee7e225 (invalid)
cdnjs 98194 bytes 18eb03c97237a55687e8d79faee7e225 (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
unpkg 97957 bytes bd5a3b3b0b2111bf041874b6e6d9a914 >
> var window = window || {};
> var self = self || {};
>
> // High-resulution counter: emulate window.performance.now [...]
> if( window.performance === undefined ) {
>
> window.performance = { };
>
> }
[...]
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
92932 bytes -6 bytes zopfli --i1000000 --mls4096 --bsr23 --lazy --ohh February 14, 2017 @ 09:23
92938 bytes -7 bytes zopfli --i100000 --mls4096 --bsr23 --lazy --ohh December 28, 2015 @ 17:08
92945 bytes -3 bytes zopfli --i10000 --mls4096 --bsr23 --lazy --ohh November 16, 2015 @ 08:38
92948 bytes -6 bytes zopfli --i10000 --mls4096 --bsr11 --lazy --ohh November 16, 2015 @ 08:30
92954 bytes -3 bytes zopfli --i1000 --mls4096 --bsr23 --lazy --ohh November 16, 2015 @ 02:07
92957 bytes -4 bytes zopfli --i1000 --mls512 --bsr12 --lazy --ohh November 16, 2015 @ 02:06
92961 bytes -1 byte zopfli --i1000 --mls4096 --bsr21 --lazy --ohh November 16, 2015 @ 02:05
92962 bytes -1 byte zopfli --i1000 --mls4096 --bsr20 --lazy --ohh November 16, 2015 @ 01:58
92963 bytes -18 bytes zopfli --i1000 --mls512 --bsr14 --lazy --ohh November 16, 2015 @ 01:52
92981 bytes zopfli --i100 --mls4096 --bsr12 --lazy --ohh November 15, 2015 @ 12:30

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

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
93132 93123 93118 93114 93144 93138 93137 93153 93099 93154 93067 93067 93093 93048 93288
93141 93115 93060 93039 93040 93051 93035 93013 93008 93078 93039 93220 93066 93117 93301
93100 93224 93105 93229 93067 93074 93030 93060 92969 93044 93217 93203 93057 93094 93287
93090 93030 93109 93064 93029 93066 93036 93036 92954 93029 93050 93226 93139 93085 93063
93222 93209 93099 93210 93039 93072 93070 93045 92954 93041 93037 93061 93136 93114 93107
93081 93211 93206 93090 93108 93025 93081 93031 92963 93037 93188 93221 93044 93064 93285
93037 93214 93225 93039 93040 93035 93077 93036 92958 93096 93095 93054 93054 93131 93105
93086 93088 93212 93029 93095 93074 93074 93033 92955 92950 92960 92945 93052 93130 93161
93090 93089 93203 93034 93031 93072 93029 93035 92951 93072 93090 92941 93082 93105 93103
93210 93101 93163 93102 93090 93034 93078 93042 92954 92950 93032 92958 93055 93111 93099
93042 93090 93096 93093 93097 93075 93068 93036 92956 92959 93035 92963 93038 93106 93081
93090 93091 93101 93025 93090 93073 93026 93033 92958 92958 93056 93032 93073 93130 93104
93097 93192 93106 93091 93035 93093 93074 93037 93039 92955 93032 92952 93077 93098 93105
93089 93088 93096 93089 93100 93076 93028 93035 93000 93025 93047 93029 93033 93070 93157
93089 93090 93094 93087 93094 93076 93033 93032 92967 92992 93038 92988 92989 93112 93108
93216 93041 93205 93072 93095 93077 93082 93032 93029 92955 92956 93120 93057 93162 93114
93090 93215 93219 93223 93077 93074 93038 93033 92956 92955 92955 92953 92950 93127 93101
93094 93216 93078 93033 93033 93072 93077 93036 92961 93033 93034 92949 93053 93109 93113
93198 93206 93220 93089 93202 93202 93040 93031 92955 92956 93031 92960 92953 93068 93104
93214 93214 93222 93035 93034 93072 93071 92960 92954 92958 93029 92932 93053 93108 93109
93091 93089 93229 93091 93075 93092 93029 92961 93033 92955 93026 92960 93030 93111 93102
93090 93089 93102 93036 93093 93090 93038 92962 92955 93035 93035 92950 93053 93110 93100
93211 93211 93090 93090 93089 93073 93076 93031 92957 92951 93039 93053 93042 93110 93101

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 92981 bytes 100%
1,000 92954 bytes -27 bytes 100%
10,000 92945 bytes -9 bytes 100%
100,000 92938 bytes -7 bytes 0.87%
1,000,000 92932 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
93105 bytes +173 bytes (+0.19%)
93555 bytes +623 bytes (+0.67%) +450 bytes
93430 bytes +498 bytes (+0.54%) +325 bytes
93431 bytes +499 bytes (+0.54%) +326 bytes
93282 bytes +350 bytes (+0.38%) +177 bytes
93271 bytes +339 bytes (+0.36%) +166 bytes
93278 bytes +346 bytes (+0.37%) +173 bytes
93250 bytes +318 bytes (+0.34%) +145 bytes
93272 bytes +340 bytes (+0.37%) +167 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 63638 bytes -29294 bytes (-31.52%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 73689 bytes -19243 bytes (-20.71%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 78323 bytes -14609 bytes (-15.72%)
Brotli (Wikipedia) brotli brotli -q 11 79185 bytes -13747 bytes (-14.79%)
LZMA2 (Wikipedia) xz xz -9 79636 bytes -13296 bytes (-14.31%)
Zstandard (Wikipedia) zstd zstd -19 84953 bytes -7979 bytes (-8.59%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 86008 bytes -6924 bytes (-7.45%)

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.