Choose a version:
52% The original file has 1176383 bytes (1,148.8k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 617600 bytes (603.1k, 52%).

After GZIP compression these minified files vary in size:
unpkg
  205983 bytes (201.2k)
CDN
gzip -6 (default)
  152269 bytes (148.7k)
local copy
jsdelivr
  152112 bytes (148.5k)
CDN
gzip -9
  151759 bytes (148.2k)
local copy
libdeflate -12
  146492 bytes (143.1k)
local copy
7zip -mx=9 -tgzip
  146405 bytes (143.0k)
local copy
zultra
  146289 bytes (142.9k)
local copy
kzip -s0 -rn -b0
  145995 bytes (142.6k)
local copy
Zopfli
  145899 bytes (142.5k)
local copy
pigz -11 -n
  145885 bytes (142.5k)
local copy

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

You will automatically get the smallest ThreeJS 136 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 6213 bytes by using my ThreeJS 136 Zopfli version instead of the best available CDN (4.26% smaller than jsdelivr, 145899 vs. 152112 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 --bsr11 --lazy --ohh

(found January 19, 2022)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 8192  --mls8192
block splitting recursion 11  --bsr11
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 (145896 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/r136/build/three.min.js --location | md5sum
4d8ccd88fb20edcf462e323ba11aae0e  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r136.min.zopfli.js.gz | md5sum
4d8ccd88fb20edcf462e323ba11aae0e  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 205983 bytes 4d8ccd88fb20edcf462e323ba11aae0e (invalid)
jsdelivr 152112 bytes 4d8ccd88fb20edcf462e323ba11aae0e January 17, 2022 @ 11:43

Note: only the MD5 hashes are shown to keep things simple.

Other Versions

Available ThreeJS versions at minime.stephan-brumme.com:

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
145899 bytes -5 bytes zopfli --i1000000 --mls8192 --bsr11 --lazy --ohh January 19, 2022 @ 16:36
145904 bytes -9 bytes zopfli --i100000 --mls8192 --bsr11 --lazy --ohh January 18, 2022 @ 14:25
145913 bytes -18 bytes zopfli --i10000 --mls8192 --bsr11 --lazy --ohh January 17, 2022 @ 20:49
145931 bytes -28 bytes zopfli --i1000 --mls8192 --bsr11 --lazy --ohh January 17, 2022 @ 12:45
145959 bytes -18 bytes zopfli --i1000 --mls8192 --bsr17 --lazy --ohh January 17, 2022 @ 12:21
145977 bytes zopfli --i100 --mls8192 --bsr11 --lazy --ohh January 17, 2022 @ 11:50

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

Most recent activity on January 19, 2022 @ 17:08.

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
146277 146154 146207 146195 146148 146158 146148 146153 146152 146195 146199 146145 146221 146191 146161
146155 146137 146144 146153 146155 146203 146206 146196 146079 146331 146061 146113 146067 146119 146094
146153 146237 146225 146088 146161 146124 146067 146330 146228 146096 146107 146101 146139 146127 146155
146142 146150 146223 146151 146145 146150 146166 146188 146098 146137 146121 146133 146088 146058 146147
146119 146133 146112 146130 146148 146163 146167 146175 146251 146160 146115 146130 146165 146044 146102
146089 146089 146099 146082 146091 146092 146050 146244 146158 146115 146115 146104 146012 146132 146114
146150 146168 146091 146093 146099 146209 146247 146230 146168 146162 146115 146098 146037 146127 146060
146047 146134 146134 146096 146067 146143 146181 146181 146073 146145 146157 146097 145899 146139 146113
146114 146091 146240 146120 146071 146185 146168 146114 146090 146137 146107 146102 146157 146117 146113
146203 146099 146112 146112 146092 146100 146049 146185 146099 146163 146125 146112 146130 146121 146103
146154 146139 146094 146234 146145 146236 146106 146096 146165 146107 146105 146102 146014 146142 146117
146120 146093 146085 146101 146089 146089 146051 146098 146161 146138 146116 146103 146070 146095 146113
146100 146215 146100 146083 146090 146093 146091 146244 146085 146278 146131 146123 146116 146135 146125
146152 146087 146099 146039 146181 146090 146083 146082 146091 146158 146109 146126 145940 146104 146106
146099 146093 146138 146131 146087 146237 146221 146132 146109 146109 146101 146123 146113 146122 146135
146091 146089 146088 146076 146165 146086 146187 146125 146108 146107 146121 146119 146124 146123 146113
146103 146122 146140 146124 146133 146049 146185 146082 146091 146273 146115 146124 146113 146105 146103
146152 146163 146163 146097 146148 146053 146183 146161 146163 146139 146112 146115 146069 146118 146129
146219 146096 146081 146080 146184 146188 146223 146094 146084 146149 146107 146122 146125 146108 146113
146095 146101 146089 146079 146087 146086 146082 146142 146117 146142 146122 146125 146109 146106 146114
146271 146146 146133 146165 146128 146166 146164 146148 146120 146137 146110 146124 146119 146117 146103
146093 146092 146093 146083 146133 146053 146083 146120 146113 146142 146107 146127 146111 146120 146110
146151 146090 146217 146094 146217 146088 146046 146091 146087 146254 146118 146111 146120 146113 146114

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 145977 bytes 100%
1,000 145931 bytes -46 bytes 100%
10,000 145913 bytes -18 bytes 100%
100,000 145904 bytes -9 bytes 0.87%
1,000,000 145899 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
145995 bytes +96 bytes (+0.07%)
146499 bytes +600 bytes (+0.41%) +504 bytes
146502 bytes +603 bytes (+0.41%) +507 bytes
146393 bytes +494 bytes (+0.34%) +398 bytes
146297 bytes +398 bytes (+0.27%) +302 bytes
146228 bytes +329 bytes (+0.23%) +233 bytes
146254 bytes +355 bytes (+0.24%) +259 bytes
146210 bytes +311 bytes (+0.21%) +215 bytes
146151 bytes +252 bytes (+0.17%) +156 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 98622 bytes -47277 bytes (-32.40%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 113908 bytes -31991 bytes (-21.93%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 117485 bytes -28414 bytes (-19.48%)
Brotli (Wikipedia) brotli brotli -q 11 123871 bytes -22028 bytes (-15.10%)
LZMA2 (Wikipedia) xz xz -9 124252 bytes -21647 bytes (-14.84%)
Zstandard (Wikipedia) zstd zstd -19 130431 bytes -15468 bytes (-10.60%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 131371 bytes -14528 bytes (-9.96%)

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 2022.
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.