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

After GZIP compression these minified files vary in size:
Boot
  118871 bytes (116.1k)
CDN
cdnjs
  98791 bytes (96.5k)
CDN
gzip -6 (default)
  97959 bytes (95.7k)
local copy
unpkg
  97935 bytes (95.6k)
CDN
Google
  97853 bytes (95.6k)
CDN
gzip -9
  97519 bytes (95.2k)
local copy
jsdelivr
  97470 bytes (95.2k)
CDN
libdeflate -12
  94115 bytes (91.9k)
local copy
7zip -mx=9 -tgzip
  93963 bytes (91.8k)
local copy
zultra
  93953 bytes (91.8k)
local copy
kzip -s0 -rn -b0
  93630 bytes (91.4k)
local copy
pigz -11 -n
  93599 bytes (91.4k)
local copy
Zopfli
  93570 bytes (91.4k)
local copy
Zopfli (defluff)
  93568 bytes (91.4k)
local copy

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

You will automatically get the smallest ThreeJS 70 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 3900 bytes by using my ThreeJS 70 Zopfli version instead of the best available CDN (4.17% smaller than jsdelivr, 93570 vs. 97470 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 --mls1024 --bsr4 --lazy --ohh

(found January 28, 2017)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 1024  --mls1024
block splitting recursion 4  --bsr4
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 2 more bytes (93568 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/r70/build/three.min.js --location | md5sum
c9071d7581fba01d27e2e9308c384d17  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r70.min.zopfli.js.gz | md5sum
c9071d7581fba01d27e2e9308c384d17  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 118871 bytes c9071d7581fba01d27e2e9308c384d17 (invalid)
cdnjs 98791 bytes c9071d7581fba01d27e2e9308c384d17 (invalid)
Google 97853 bytes c9071d7581fba01d27e2e9308c384d17 (invalid)
jsdelivr 97470 bytes c9071d7581fba01d27e2e9308c384d17 (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
unpkg 97935 bytes 33b5089dd3fe8d55166223573baa9fb3 only whitespaces differ 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
93570 bytes -4 bytes zopfli --i1000000 --mls1024 --bsr4 --lazy --ohh January 28, 2017 @ 12:24
93574 bytes -10 bytes zopfli --i100000 --mls1024 --bsr4 --lazy --ohh December 29, 2015 @ 10:56
93584 bytes -16 bytes zopfli --i10000 --mls1024 --bsr4 --lazy --ohh November 14, 2015 @ 02:17
93600 bytes -33 bytes zopfli --i1000 --mls1024 --bsr4 --lazy --ohh November 14, 2015 @ 02:02
93633 bytes zopfli --i100 --mls1024 --bsr4 --lazy --ohh November 14, 2015 @ 01:20

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

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
93680 93678 93678 93713 93857 93743 93689 93690 93690 93722 93705 93644 93733 93757 93688
93719 93718 93717 93671 93670 93666 93677 93616 93625 93570 93682 93713 93644 93680 93866
93640 93659 93685 93674 93653 93681 93630 93621 93680 93658 93643 93631 93650 93634 93666
93677 93682 93635 93690 93688 93674 93633 93622 93624 93657 93638 93635 93633 93645 93674
93654 93667 93641 93641 93669 93636 93647 93652 93651 93778 93656 93628 93632 93596 93864
93681 93665 93779 93792 93792 93614 93654 93626 93676 93636 93635 93642 93620 93704 93680
93674 93669 93808 93796 93792 93789 93623 93623 93623 93634 93636 93631 93634 93642 93644
93701 93705 93681 93680 93699 93654 93630 93624 93626 93631 93624 93631 93650 93649 93656
93656 93655 93765 93653 93664 93766 93648 93628 93649 93650 93629 93633 93627 93642 93636
93666 93671 93662 93670 93669 93668 93626 93628 93648 93631 93625 93634 93628 93665 93656
93672 93675 93660 93656 93665 93654 93662 93612 93652 93657 93624 93640 93630 93591 93629
93671 93675 93672 93664 93648 93658 93663 93575 93651 93651 93630 93647 93632 93646 93685
93653 93648 93650 93663 93651 93643 93649 93634 93651 93625 93631 93652 93629 93671 93692
93657 93664 93660 93672 93675 93652 93678 93655 93653 93625 93625 93643 93630 93647 93672
93676 93657 93677 93671 93665 93678 93671 93618 93667 93652 93627 93633 93632 93646 93666
93663 93679 93657 93678 93648 93662 93654 93627 93647 93657 93634 93637 93635 93638 93679
93650 93648 93651 93670 93673 93658 93666 93650 93652 93624 93627 93652 93628 93676 93671
93651 93656 93767 93765 93763 93643 93643 93626 93688 93628 93623 93643 93629 93671 93656
93659 93655 93649 93685 93685 93677 93664 93626 93665 93666 93627 93654 93632 93643 93656
93671 93672 93657 93661 93666 93677 93663 93656 93624 93638 93628 93657 93633 93643 93661
93652 93648 93782 93660 93665 93763 93675 93628 93672 93626 93629 93631 93633 93641 93656
93632 93657 93659 93661 93659 93658 93652 93621 93663 93627 93626 93649 93654 93640 93651
93654 93656 93653 93656 93660 93655 93664 93625 93640 93627 93624 93652 93631 93646 93660

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 93633 bytes 100%
1,000 93600 bytes -33 bytes 100%
10,000 93584 bytes -16 bytes 100%
100,000 93574 bytes -10 bytes 0.58%
1,000,000 93570 bytes -4 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
93630 bytes +60 bytes (+0.06%)
94114 bytes +544 bytes (+0.58%) +484 bytes
94094 bytes +524 bytes (+0.56%) +464 bytes
94007 bytes +437 bytes (+0.47%) +377 bytes
93939 bytes +369 bytes (+0.39%) +309 bytes
93858 bytes +288 bytes (+0.31%) +228 bytes
93851 bytes +281 bytes (+0.30%) +221 bytes
93731 bytes +161 bytes (+0.17%) +101 bytes
93713 bytes +143 bytes (+0.15%) +83 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 64458 bytes -29112 bytes (-31.11%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 74338 bytes -19232 bytes (-20.55%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 77752 bytes -15818 bytes (-16.90%)
Brotli (Wikipedia) brotli brotli -q 11 81165 bytes -12405 bytes (-13.26%)
LZMA2 (Wikipedia) xz xz -9 81844 bytes -11726 bytes (-12.53%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 86345 bytes -7225 bytes (-7.72%)
Zstandard (Wikipedia) zstd zstd -19 87012 bytes -6558 bytes (-7.01%)

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.