Choose a version:
50% The original file has 814124 bytes (795.0k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 410947 bytes (401.3k, 50%).

After GZIP compression these minified files vary in size:
Boot
  119501 bytes (116.7k)
CDN
cdnjs
  99718 bytes (97.4k)
CDN
gzip -6 (default)
  98781 bytes (96.5k)
local copy
gzip -9
  98367 bytes (96.1k)
local copy
libdeflate -12
  95086 bytes (92.9k)
local copy
zultra
  95078 bytes (92.8k)
local copy
7zip -mx=9 -tgzip
  95016 bytes (92.8k)
local copy
pigz -11 -n
  94690 bytes (92.5k)
local copy
kzip -s0 -rn -b0
  94659 bytes (92.4k)
local copy
Zopfli
  94628 bytes (92.4k)
local copy
Zopfli (defluff)
  94623 bytes (92.4k)
local copy

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

You will automatically get the smallest ThreeJS 62 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 5090 bytes by using my ThreeJS 62 Zopfli version instead of the best available CDN (5.38% smaller than cdnjs, 94628 vs. 99718 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 February 6, 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 5 more bytes (94623 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/r62/build/three.min.js --location | md5sum
0b36909160fc2331bedcfdf3e5f6d700  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r62.min.zopfli.js.gz | md5sum
0b36909160fc2331bedcfdf3e5f6d700  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 119501 bytes 0b36909160fc2331bedcfdf3e5f6d700 (invalid)
cdnjs 99718 bytes 0b36909160fc2331bedcfdf3e5f6d700 (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
94628 bytes -1 byte zopfli --i1000000 --mls1024 --bsr4 --lazy --ohh February 6, 2017 @ 11:58
94629 bytes -3 bytes zopfli --i1000000 --mls8192 --bsr9 --lazy --ohh February 6, 2017 @ 11:51
94632 bytes -8 bytes zopfli --i100000 --mls1024 --bsr4 --lazy --ohh December 28, 2015 @ 20:30
94640 bytes -12 bytes zopfli --i10000 --mls256 --bsr8 --lazy --ohh November 17, 2015 @ 05:23
94652 bytes -18 bytes zopfli --i1000 --mls256 --bsr8 --lazy --ohh November 16, 2015 @ 17:20
94670 bytes zopfli --i100 --mls256 --bsr8 --lazy --ohh November 16, 2015 @ 09:32

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

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
94756 94773 94751 94744 94746 94752 94766 94724 94744 94715 94703 94693 94729 94710 94736
94695 94696 94747 94743 94704 94694 94698 94671 94695 94628 94707 94656 94700 94707 94711
94751 94765 94759 94757 94716 94812 94696 94696 94880 94696 94723 94719 94660 94652 94716
94698 94689 94700 94714 94701 94747 94714 94695 94804 94810 94705 94686 94677 94702 94702
94862 94776 94830 94746 94706 94752 94673 94635 94684 94707 94718 94683 94702 94721 94708
94806 94804 94871 94874 94836 94827 94681 94677 94706 94695 94727 94700 94629 94776 94706
94853 94801 94831 94828 94742 94823 94706 94677 94706 94717 94732 94732 94712 94746 94703
94752 94756 94754 94718 94689 94691 94690 94677 94702 94697 94710 94759 94725 94734 94737
94753 94758 94689 94741 94738 94674 94696 94676 94705 94713 94700 94742 94657 94692 94705
94756 94751 94752 94701 94676 94693 94757 94683 94707 94711 94711 94743 94717 94708 94705
94791 94761 94755 94754 94746 94691 94690 94737 94710 94700 94743 94749 94722 94691 94709
94755 94691 94698 94756 94671 94676 94690 94673 94687 94717 94677 94697 94696 94661 94701
94780 94785 94680 94692 94733 94672 94670 94695 94690 94701 94734 94744 94725 94684 94701
94756 94757 94693 94696 94730 94689 94685 94738 94752 94697 94661 94743 94728 94707 94696
94755 94757 94737 94738 94676 94684 94682 94673 94705 94699 94668 94769 94714 94700 94760
94739 94787 94754 94752 94744 94741 94811 94671 94675 94720 94666 94750 94713 94739 94819
94757 94692 94744 94739 94742 94747 94690 94735 94688 94696 94675 94701 94733 94688 94705
94872 94774 94756 94835 94792 94795 94813 94672 94704 94701 94675 94760 94708 94739 94707
94851 94801 94860 94853 94800 94801 94858 94693 94705 94764 94719 94725 94714 94718 94699
94780 94756 94758 94752 94748 94695 94684 94743 94704 94692 94676 94746 94689 94717 94699
94757 94693 94697 94748 94673 94691 94692 94676 94689 94701 94700 94696 94723 94717 94707
94692 94691 94750 94747 94729 94675 94687 94673 94690 94751 94681 94742 94711 94712 94704
94731 94695 94701 94761 94676 94674 94673 94678 94682 94700 94748 94748 94724 94717 94708

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 94670 bytes 100%
1,000 94652 bytes -18 bytes 100%
10,000 94640 bytes -12 bytes 100%
100,000 94632 bytes -8 bytes 0.87%
1,000,000 94628 bytes -4 bytes 0.58%
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
94659 bytes +31 bytes (+0.03%)
95136 bytes +508 bytes (+0.54%) +477 bytes
95022 bytes +394 bytes (+0.42%) +363 bytes
94998 bytes +370 bytes (+0.39%) +339 bytes
94880 bytes +252 bytes (+0.27%) +221 bytes
94837 bytes +209 bytes (+0.22%) +178 bytes
94857 bytes +229 bytes (+0.24%) +198 bytes
94743 bytes +115 bytes (+0.12%) +84 bytes
94723 bytes +95 bytes (+0.10%) +64 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 64771 bytes -29857 bytes (-31.55%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 74464 bytes -20164 bytes (-21.31%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 79589 bytes -15039 bytes (-15.89%)
Brotli (Wikipedia) brotli brotli -q 11 80677 bytes -13951 bytes (-14.74%)
LZMA2 (Wikipedia) xz xz -9 81368 bytes -13260 bytes (-14.01%)
Zstandard (Wikipedia) zstd zstd -19 86445 bytes -8183 bytes (-8.65%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 86877 bytes -7751 bytes (-8.19%)

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.