Choose a version:
52% The original file has 796216 bytes (777.6k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 415779 bytes (406.0k, 52%).

After GZIP compression these minified files vary in size:
Boot
  119821 bytes (117.0k)
CDN
cdnjs
  99168 bytes (96.8k)
CDN
unpkg
  98539 bytes (96.2k)
CDN
gzip -6 (default)
  98223 bytes (95.9k)
local copy
Google
  98193 bytes (95.9k)
CDN
gzip -9
  97794 bytes (95.5k)
local copy
jsdelivr
  97790 bytes (95.5k)
CDN
libdeflate -12
  94348 bytes (92.1k)
local copy
7zip -mx=9 -tgzip
  94323 bytes (92.1k)
local copy
zultra
  94287 bytes (92.1k)
local copy
pigz -11 -n
  94038 bytes (91.8k)
local copy
kzip -s0 -rn -b0
  93964 bytes (91.8k)
local copy
Zopfli
  93877 bytes (91.7k)
local copy
Zopfli (defluff)
  93874 bytes (91.7k)
local copy

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

You will automatically get the smallest ThreeJS 69 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 3913 bytes by using my ThreeJS 69 Zopfli version instead of the best available CDN (4.17% smaller than jsdelivr, 93877 vs. 97790 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 --mls32 --bsr9 --lazy --ohh

(found February 1, 2017)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 32  --mls32
block splitting recursion 9  --bsr9
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 (93874 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/r69/build/three.min.js --location | md5sum
7adfe2e8c34b56f94ad30268f76232ed  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r69.min.zopfli.js.gz | md5sum
7adfe2e8c34b56f94ad30268f76232ed  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 119821 bytes 7adfe2e8c34b56f94ad30268f76232ed (invalid)
cdnjs 99168 bytes 7adfe2e8c34b56f94ad30268f76232ed (invalid)
Google 98193 bytes 7adfe2e8c34b56f94ad30268f76232ed (invalid)
jsdelivr 97790 bytes 7adfe2e8c34b56f94ad30268f76232ed (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
unpkg 98539 bytes b809582e9a0eccba2913c08637ed7170 < // threejs.org/license
> var self = self || {};// threejs.org/license
< multiply:function(a,b){return void 0!==b?(console.warn("TH [...]
< O=d[7],S=d[11],d=d[15];e[0]=f*w+g*E+h*R+k*Q;e[4]=f*K+g*A+h [...]
> multiply:function(a,b){return void 0!==b?(console.warn("TH [...]
> O=d[7],W=d[11],d=d[15];e[0]=f*w+g*E+h*S+k*R;e[4]=f*L+g*A+h [...]
< c[d+8]=q.z;this.normalizeNormals();a.normal.needsUpdate=!0 [...]
< 3*a);P.copy(ya);Fa=k[a];la.copy(Fa);la.sub(ya.multiplyScal [...]
< e=this.attributes.normal.array,f=this.attributes.uv.array, [...]
< this.addDrawCall(0,c.length,0);var X=this.drawcalls,p=0;fo [...]
[...]
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
93877 bytes -5 bytes zopfli --i1000000 --mls32 --bsr9 --lazy --ohh February 1, 2017 @ 08:09
93882 bytes -6 bytes zopfli --i100000 --mls32 --bsr9 --lazy --ohh December 29, 2015 @ 10:58
93888 bytes -1 byte zopfli --i10000 --mls32 --bsr9 --lazy --ohh November 16, 2015 @ 16:03
93889 bytes -2 bytes zopfli --i10000 --mls16384 --bsr16 --lazy --ohh November 16, 2015 @ 01:20
93891 bytes -6 bytes zopfli --i10000 --mls16384 --bsr12 --lazy --ohh November 15, 2015 @ 21:40
93897 bytes -2 bytes zopfli --i10000 --mls32 --bsr20 --lazy --ohh November 15, 2015 @ 20:13
93899 bytes -3 bytes zopfli --i1000 --mls16384 --bsr6 --lazy --ohh November 15, 2015 @ 15:03
93902 bytes -12 bytes zopfli --i1000 --mls32 --bsr9 --lazy --ohh November 15, 2015 @ 15:02
93914 bytes -12 bytes zopfli --i1000 --mls32 --bsr20 --lazy --ohh November 15, 2015 @ 15:02
93926 bytes zopfli --i100 --mls16384 --bsr16 --lazy --ohh November 15, 2015 @ 10:33

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

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
94138 94025 94186 94024 94021 93987 94012 93977 94017 94030 94149 94127 94044 94031 94056
94066 94058 94062 94008 93957 94008 94024 94022 93970 93985 93962 94009 93995 93946 93998
93993 93975 93982 93971 93974 93979 93945 93948 93966 93968 93973 93972 94000 93885 93935
93970 93967 93969 93957 93990 93962 94017 93992 93962 94016 93964 93920 93959 94016 94009
94107 93968 93958 93973 93998 93968 93947 93948 93950 93993 93979 93962 93933 93958 93974
93963 93970 93963 93944 93877 93940 93957 93940 93936 93954 93968 93966 93965 94032 93996
93952 93971 93950 93950 93946 93950 93949 93938 93967 93941 93966 93975 93942 93895 93964
94070 94002 94059 94050 93996 93962 93962 93952 93964 93980 93959 93966 93964 93982 94003
93960 93961 93958 93952 93911 93954 93947 93956 94021 93970 93959 93968 93969 93886 93951
93960 93962 93965 93990 93959 93983 93962 93925 93931 93968 93959 93981 93965 93946 93997
93972 93967 93959 93949 93958 93955 93962 93942 93940 93965 93959 93965 93944 93987 93995
93963 93954 93959 93967 93935 93966 93968 93940 93943 93967 93963 93959 93970 94019 93994
93955 93965 93956 93966 93957 93959 93963 93956 93978 93959 93973 93965 93965 93885 93946
93964 93957 93952 93944 93900 93958 93968 93950 93940 93970 93960 93981 93964 93943 93989
93954 93959 93963 93951 93967 93970 93973 93942 93959 93977 93959 93950 93944 93968 93935
93958 93962 93993 93965 93955 93968 93966 93957 93947 93975 93967 93958 93970 93972 94026
93949 93956 93967 93955 93897 93963 93965 93952 93971 93966 93965 93964 93949 93965 93994
93953 93962 93957 93951 93959 93962 93962 93950 93937 93968 93966 93965 93966 93957 94000
93963 93948 93955 93954 93959 93962 93962 93956 93944 93970 93961 93958 93964 93969 93999
93971 93965 93967 93961 93900 93963 93962 93944 93940 93961 93963 93972 93958 93962 93995
93958 93970 93964 93956 93960 93967 93963 93941 93935 93962 93966 93974 93970 93940 94002
93958 93958 93959 93954 93950 93964 93965 93941 93940 93964 93964 93969 93959 93942 94000
93962 93962 93956 93952 93965 93961 93962 93933 93949 93962 93961 93962 93966 93966 93930

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 93926 bytes 100%
1,000 93899 bytes -27 bytes 100%
10,000 93888 bytes -11 bytes 100%
100,000 93882 bytes -6 bytes 1.16%
1,000,000 93877 bytes -5 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
93964 bytes +87 bytes (+0.09%)
94491 bytes +614 bytes (+0.65%) +527 bytes
94477 bytes +600 bytes (+0.64%) +513 bytes
94321 bytes +444 bytes (+0.47%) +357 bytes
94242 bytes +365 bytes (+0.39%) +278 bytes
94180 bytes +303 bytes (+0.32%) +216 bytes
94139 bytes +262 bytes (+0.28%) +175 bytes
94023 bytes +146 bytes (+0.16%) +59 bytes
94030 bytes +153 bytes (+0.16%) +66 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 64633 bytes -29244 bytes (-31.15%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 74455 bytes -19422 bytes (-20.69%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 78436 bytes -15441 bytes (-16.45%)
Brotli (Wikipedia) brotli brotli -q 11 81165 bytes -12712 bytes (-13.54%)
LZMA2 (Wikipedia) xz xz -9 81932 bytes -11945 bytes (-12.72%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 86477 bytes -7400 bytes (-7.88%)
Zstandard (Wikipedia) zstd zstd -19 87146 bytes -6731 bytes (-7.17%)

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.