Choose a version:
53% The original file has 1170528 bytes (1,143.1k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 616441 bytes (602.0k, 53%).

After GZIP compression these minified files vary in size:
unpkg
  205777 bytes (201.0k)
CDN
gzip -6 (default)
  152174 bytes (148.6k)
local copy
jsdelivr
  152019 bytes (148.5k)
CDN
gzip -9
  151654 bytes (148.1k)
local copy
libdeflate -12
  146430 bytes (143.0k)
local copy
7zip -mx=9 -tgzip
  146290 bytes (142.9k)
local copy
zultra
  146226 bytes (142.8k)
local copy
kzip -s0 -rn -b8
  146021 bytes (142.6k)
local copy
Zopfli
  145867 bytes (142.4k)
local copy
pigz -11 -n
  145792 bytes (142.4k)
local copy

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

You will automatically get the smallest ThreeJS 135 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 6152 bytes by using my ThreeJS 135 Zopfli version instead of the best available CDN (4.22% smaller than jsdelivr, 145867 vs. 152019 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 --bsr7 --lazy --ohh

(found November 30, 2021)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 8192  --mls8192
block splitting recursion 7  --bsr7
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 (145862 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/r135/build/three.min.js --location | md5sum
cba2b6ed645c0a7e8435f134515d0b90  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r135.min.zopfli.js.gz | md5sum
cba2b6ed645c0a7e8435f134515d0b90  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 205777 bytes cba2b6ed645c0a7e8435f134515d0b90 (invalid)
jsdelivr 152019 bytes cba2b6ed645c0a7e8435f134515d0b90 November 26, 2021 @ 11:21

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
145867 bytes -8 bytes zopfli --i1000000 --mls8192 --bsr7 --lazy --ohh November 30, 2021 @ 10:59
145875 bytes -6 bytes zopfli --i100000 --mls8192 --bsr7 --lazy --ohh November 29, 2021 @ 11:18
145881 bytes -18 bytes zopfli --i10000 --mls8192 --bsr7 --lazy --ohh November 26, 2021 @ 16:11
145899 bytes -42 bytes zopfli --i1000 --mls8192 --bsr7 --lazy --ohh November 26, 2021 @ 13:08
145941 bytes zopfli --i100 --mls8192 --bsr7 --lazy --ohh November 26, 2021 @ 11:38

If there are multiple parameter sets yielding the same compressed size, only the first one found is shown.

Most recent activity on November 30, 2021 @ 12:48.

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
146111 146156 146153 146100 146109 146055 146058 146055 146101 146100 146028 146119 146038 146064 146115
146067 146063 146149 146075 146066 146064 146137 146088 146133 146134 145983 146016 145898 145981 145973
146131 146184 146181 146178 146178 146126 146179 146126 146069 146047 145987 146002 146011 145919 146001
146121 146135 146012 146186 146169 146070 146178 146072 146074 146051 146035 146032 145867 146001 146009
146179 146121 146033 146187 146023 146121 146131 146156 146051 146058 146012 146018 146042 145984 146002
146183 146124 146155 146132 146172 146137 146063 146075 146141 146042 146003 145913 145927 146017 146017
146188 146163 146160 146145 146173 146135 146141 146131 146050 146044 146011 146002 145998 146017 145990
146142 146060 146144 146124 146189 146070 146080 146070 146048 146021 145987 145996 145973 146023 146075
146180 146192 146151 146179 146175 146067 146138 146135 146044 146060 146028 145994 146053 145953 146006
146212 146185 146134 146134 146179 146078 146149 146080 146075 146045 146034 146015 146007 146009 145994
146187 146126 146031 146180 146165 146134 146141 146064 146042 146012 146015 145995 145985 145916 146004
146188 146138 146149 146174 146074 146061 146062 146070 146075 146009 146027 146024 146023 145978 146013
146163 146097 146149 146180 146171 146069 146143 146136 146148 146009 145947 146050 145929 145993 146000
146192 146137 146132 146175 146078 146051 146051 146073 146120 146055 146012 146012 146009 145944 146020
146183 146064 146040 146083 146187 146133 146071 145990 145996 146016 146010 146018 145997 146031 146001
146196 146139 146153 146178 146108 146069 146069 146074 146002 146009 145941 146023 145997 146036 146008
146076 146096 146035 146186 146115 146136 146134 146050 145988 146016 146017 146014 146005 145990 145993
146192 146180 146017 146196 146073 146075 146073 146069 146021 146020 146016 146028 146000 145989 146004
146187 146135 146120 146188 146168 146118 146078 146067 146002 146015 146018 146022 146001 145974 145966
146202 146183 146130 146175 146066 146072 146068 146027 145990 146004 146013 146028 146006 146000 146013
146189 146194 146187 146140 146078 146132 146130 146034 146033 145993 146014 146018 146011 145976 146002
146193 146137 146014 146129 146052 146057 146056 146034 146035 145997 146008 146018 146012 145979 146010
146199 146188 146014 146180 146172 146063 146068 146047 146048 146004 145991 146021 145990 146018 146005

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 145941 bytes 100%
1,000 145899 bytes -42 bytes 100%
10,000 145881 bytes -18 bytes 100%
100,000 145875 bytes -6 bytes 0.58%
1,000,000 145867 bytes -8 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
146059 bytes +192 bytes (+0.13%) +38 bytes
146391 bytes +524 bytes (+0.36%) +370 bytes
146407 bytes +540 bytes (+0.37%) +386 bytes
146303 bytes +436 bytes (+0.30%) +282 bytes
146193 bytes +326 bytes (+0.22%) +172 bytes
146137 bytes +270 bytes (+0.19%) +116 bytes
146127 bytes +260 bytes (+0.18%) +106 bytes
146117 bytes +250 bytes (+0.17%) +96 bytes
146021 bytes +154 bytes (+0.11%)

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 98631 bytes -47236 bytes (-32.38%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 113795 bytes -32072 bytes (-21.99%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 117417 bytes -28450 bytes (-19.50%)
Brotli (Wikipedia) brotli brotli -q 11 123811 bytes -22056 bytes (-15.12%)
LZMA2 (Wikipedia) xz xz -9 124108 bytes -21759 bytes (-14.92%)
Zstandard (Wikipedia) zstd zstd -19 130288 bytes -15579 bytes (-10.68%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 131317 bytes -14550 bytes (-9.97%)

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.