Choose a version:
53% The original file has 797039 bytes (778.4k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 423927 bytes (414.0k, 53%).

After GZIP compression these minified files vary in size:
Boot
  121856 bytes (119.0k)
CDN
cdnjs
  100644 bytes (98.3k)
CDN
unpkg
  100348 bytes (98.0k)
CDN
gzip -6 (default)
  99584 bytes (97.3k)
local copy
Google
  99536 bytes (97.2k)
CDN
gzip -9
  99185 bytes (96.9k)
local copy
jsdelivr
  99112 bytes (96.8k)
CDN
zultra
  95749 bytes (93.5k)
local copy
libdeflate -12
  95740 bytes (93.5k)
local copy
7zip -mx=9 -tgzip
  95690 bytes (93.4k)
local copy
pigz -11 -n
  95482 bytes (93.2k)
local copy
kzip -s0 -rn -b8
  95410 bytes (93.2k)
local copy
Zopfli
  95293 bytes (93.1k)
local copy
Zopfli (defluff)
  95290 bytes (93.1k)
local copy

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

You will automatically get the smallest ThreeJS 72 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 3819 bytes by using my ThreeJS 72 Zopfli version instead of the best available CDN (4.01% smaller than jsdelivr, 95293 vs. 99112 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 --bsr19 --lazy --ohh

(found January 28, 2017)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 8192  --mls8192
block splitting recursion 19  --bsr19
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 (95290 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/r72/build/three.min.js --location | md5sum
130f3f943b1dffc0c682ecea913c92ba  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r72.min.zopfli.js.gz | md5sum
130f3f943b1dffc0c682ecea913c92ba  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Google 99536 bytes 130f3f943b1dffc0c682ecea913c92ba (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
Boot 121856 bytes 1300b77eb565fce296ea5c3738fe45fb < this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var b [...]
< (d.userData=this.userData);!0!==this.visible&&(d.visible=t [...]
< b&&(b=!0);this.name=a.name;this.up.copy(a.up);this.positio [...]
< JSON.parse(JSON.stringify(a.userData));if(!0===b)for(var c [...]
> this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var b [...]
> this.userData);!0!==this.visible&&(d.visible=this.visible) [...]
> b){void 0===b&&(b=!0);this.name=a.name;this.up.copy(a.up); [...]
> this.userData=JSON.parse(JSON.stringify(a.userData));if(!0 [...]
< c))):"index"===a?(console.warn("THREE.BufferGeometry.addAt [...]
> c))):("index"===a&&(console.warn("THREE.BufferGeometry.add [...]
[...]
(invalid)
cdnjs 100644 bytes 1300b77eb565fce296ea5c3738fe45fb < this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var b [...]
< (d.userData=this.userData);!0!==this.visible&&(d.visible=t [...]
< b&&(b=!0);this.name=a.name;this.up.copy(a.up);this.positio [...]
< JSON.parse(JSON.stringify(a.userData));if(!0===b)for(var c [...]
> this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var b [...]
> this.userData);!0!==this.visible&&(d.visible=this.visible) [...]
> b){void 0===b&&(b=!0);this.name=a.name;this.up.copy(a.up); [...]
> this.userData=JSON.parse(JSON.stringify(a.userData));if(!0 [...]
< c))):"index"===a?(console.warn("THREE.BufferGeometry.addAt [...]
> c))):("index"===a&&(console.warn("THREE.BufferGeometry.add [...]
[...]
(invalid)
unpkg 100348 bytes 5228a0bfdc6b150c4ba8c125d105cfec < // threejs.org/license
> var self = self || {};// threejs.org/license
< this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var b [...]
< (d.userData=this.userData);!0!==this.visible&&(d.visible=t [...]
< b&&(b=!0);this.name=a.name;this.up.copy(a.up);this.positio [...]
< JSON.parse(JSON.stringify(a.userData));if(!0===b)for(var c [...]
> this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var b [...]
> this.userData);!0!==this.visible&&(d.visible=this.visible) [...]
> b){void 0===b&&(b=!0);this.name=a.name;this.up.copy(a.up); [...]
> this.userData=JSON.parse(JSON.stringify(a.userData));if(!0 [...]
[...]
July 11, 2016 @ 15:49
jsdelivr 99112 bytes 9558e2393dff47f1a318e3dc26b2ae59 < this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var b [...]
< (d.userData=this.userData);!0!==this.visible&&(d.visible=t [...]
< b&&(b=!0);this.name=a.name;this.up.copy(a.up);this.positio [...]
< JSON.parse(JSON.stringify(a.userData));if(!0===b)for(var c [...]
> this.matrix),this.matrixWorldNeedsUpdate=!1,a=!0;for(var b [...]
> this.userData);!0!==this.visible&&(d.visible=this.visible) [...]
> b){void 0===b&&(b=!0);this.name=a.name;this.up.copy(a.up); [...]
> this.userData=JSON.parse(JSON.stringify(a.userData));if(!0 [...]
< c))):"index"===a?(console.warn("THREE.BufferGeometry.addAt [...]
> c))):("index"===a&&(console.warn("THREE.BufferGeometry.add [...]
[...]
(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
95293 bytes -3 bytes zopfli --i1000000 --mls8192 --bsr19 --lazy --ohh January 28, 2017 @ 13:24
95296 bytes -3 bytes zopfli --i100000 --mls8192 --bsr19 --lazy --ohh November 14, 2015 @ 11:04
95299 bytes -5 bytes zopfli --i10000 --mls8192 --bsr19 --lazy --ohh November 14, 2015 @ 01:48
95304 bytes -13 bytes zopfli --i10000 --mls64 --bsr19 --lazy --ohh November 14, 2015 @ 01:31
95317 bytes -24 bytes zopfli --i1000 --mls64 --bsr19 --lazy --ohh November 14, 2015 @ 01:11
95341 bytes zopfli --i100 --mls8192 --bsr19 --lazy --ohh November 14, 2015 @ 00:14

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: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
95478 95451 95498 95497 95482 95487 95494 95463 95470 95514 95531 95589 95443 95525 95539
95499 95513 95430 95491 95478 95478 95517 95480 95525 95382 95397 95476 95431 95479 95506
95453 95419 95451 95435 95417 95453 95462 95452 95454 95370 95491 95387 95403 95464 95476
95447 95445 95417 95468 95468 95457 95445 95427 95487 95374 95493 95481 95443 95346 95486
95457 95465 95453 95398 95403 95332 95429 95453 95495 95399 95452 95323 95482 95378 95366
95445 95444 95410 95448 95407 95407 95424 95449 95454 95442 95454 95483 95458 95467 95497
95399 95454 95400 95421 95449 95409 95434 95416 95450 95444 95441 95460 95453 95457 95501
95498 95504 95416 95394 95410 95485 95483 95430 95484 95443 95483 95483 95502 95478 95494
95445 95412 95411 95437 95417 95439 95445 95471 95466 95440 95442 95472 95466 95495 95503
95510 95493 95414 95481 95437 95496 95500 95479 95482 95478 95477 95444 95414 95511 95421
95459 95454 95443 95411 95408 95471 95455 95448 95452 95444 95449 95468 95456 95496 95489
95442 95461 95417 95451 95484 95460 95458 95450 95497 95502 95445 95462 95404 95488 95486
95456 95453 95415 95415 95419 95447 95434 95447 95486 95482 95449 95484 95505 95463 95492
95450 95439 95497 95471 95401 95409 95447 95445 95478 95452 95369 95344 95450 95463 95457
95568 95411 95402 95446 95565 95488 95478 95315 95444 95364 95487 95455 95432 95455 95501
95568 95569 95477 95446 95499 95298 95415 95434 95560 95475 95484 95479 95293 95508 95504
95454 95565 95440 95450 95430 95397 95467 95449 95480 95439 95445 95364 95511 95495 95510
95491 95449 95420 95407 95470 95443 95445 95454 95450 95446 95451 95488 95455 95496 95509
95439 95450 95451 95408 95400 95436 95452 95490 95480 95455 95476 95485 95490 95492 95497
95445 95467 95412 95448 95439 95455 95491 95453 95443 95439 95447 95473 95452 95462 95493
95423 95488 95421 95408 95406 95403 95449 95440 95446 95473 95453 95495 95452 95489 95498
95449 95450 95409 95401 95410 95437 95405 95433 95450 95473 95435 95498 95461 95507 95519
95402 95450 95438 95396 95405 95406 95431 95450 95435 95435 95435 95450 95451 95465 95488

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 95341 bytes 100%
1,000 95317 bytes -24 bytes 100%
10,000 95299 bytes -18 bytes 100%
100,000 95296 bytes -3 bytes 0.58%
1,000,000 95293 bytes -3 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
95434 bytes +141 bytes (+0.15%) +24 bytes
95848 bytes +555 bytes (+0.58%) +438 bytes
95767 bytes +474 bytes (+0.50%) +357 bytes
95699 bytes +406 bytes (+0.43%) +289 bytes
95673 bytes +380 bytes (+0.40%) +263 bytes
95614 bytes +321 bytes (+0.34%) +204 bytes
95605 bytes +312 bytes (+0.33%) +195 bytes
95485 bytes +192 bytes (+0.20%) +75 bytes
95410 bytes +117 bytes (+0.12%)

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 65520 bytes -29773 bytes (-31.24%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 75078 bytes -20215 bytes (-21.21%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 78863 bytes -16430 bytes (-17.24%)
Brotli (Wikipedia) brotli brotli -q 11 82655 bytes -12638 bytes (-13.26%)
LZMA2 (Wikipedia) xz xz -9 83420 bytes -11873 bytes (-12.46%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 87073 bytes -8220 bytes (-8.63%)
Zstandard (Wikipedia) zstd zstd -19 88338 bytes -6955 bytes (-7.30%)

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.