Choose a version:
50% The original file has 1184912 bytes (1,157.1k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 592594 bytes (578.7k, 50%).

After GZIP compression these minified files vary in size:
unpkg
  181944 bytes (177.7k)
CDN
cdnjs
  150325 bytes (146.8k)
CDN
gzip -6 (default)
  148736 bytes (145.3k)
local copy
jsdelivr
  148643 bytes (145.2k)
CDN
gzip -9
  148203 bytes (144.7k)
local copy
libdeflate -12
  143151 bytes (139.8k)
local copy
7zip -mx=9 -tgzip
  143114 bytes (139.8k)
local copy
kzip -s0 -rn -b0
  142825 bytes (139.5k)
local copy
pigz -11 -n
  142723 bytes (139.4k)
local copy
Zopfli
  142677 bytes (139.3k)
local copy
Zopfli (defluff)
  142673 bytes (139.3k)
local copy

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

You will automatically get the smallest ThreeJS 109 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 5966 bytes by using my ThreeJS 109 Zopfli version instead of the best available CDN (4.18% smaller than jsdelivr, 142677 vs. 148643 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 --bsr19 --lazy --ohh

(found October 7, 2019)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 1024  --mls1024
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 4 more bytes (142673 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/r109/build/three.min.js --location | md5sum
32b9147c1c127cc78ad44eff8dd6c777  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r109.min.zopfli.js.gz | md5sum
32b9147c1c127cc78ad44eff8dd6c777  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 181944 bytes 32b9147c1c127cc78ad44eff8dd6c777 (invalid)
cdnjs 150325 bytes 32b9147c1c127cc78ad44eff8dd6c777 (invalid)
jsdelivr 148643 bytes 32b9147c1c127cc78ad44eff8dd6c777 October 4, 2019 @ 12:59

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

Other Versions

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

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
142677 bytes -2 bytes zopfli --i1000000 --mls1024 --bsr19 --lazy --ohh October 7, 2019 @ 07:41
142679 bytes -14 bytes zopfli --i100000 --mls1024 --bsr19 --lazy --ohh October 6, 2019 @ 10:14
142693 bytes -19 bytes zopfli --i10000 --mls1024 --bsr19 --lazy --ohh October 4, 2019 @ 19:22
142712 bytes -6 bytes zopfli --i10000 --mls1024 --bsr25 --lazy --ohh October 4, 2019 @ 19:03
142718 bytes -1 byte zopfli --i1000 --mls1024 --bsr19 --lazy --ohh October 4, 2019 @ 13:46
142719 bytes -14 bytes zopfli --i1000 --mls16 --bsr18 --lazy --ohh October 4, 2019 @ 13:46
142733 bytes -10 bytes zopfli --i1000 --mls16 --bsr10 --lazy --ohh October 4, 2019 @ 13:44
142743 bytes zopfli --i100 --mls16 --bsr18 --lazy --ohh October 4, 2019 @ 13:05

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

Most recent activity on October 7, 2019 @ 10:46.

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
142948 142946 142918 142934 142915 142917 142981 142975 142969 142920 142955 142910 142921 142906 142925
142869 142862 142862 142870 142878 142878 142883 142875 142873 142869 142842 142834 142800 142872 142820
142872 142885 142867 142831 142869 142857 142848 142857 142908 142822 142795 142860 142851 142845 142872
142886 142899 142844 142843 142775 142888 142765 142891 142755 142778 142839 142771 142904 142899 142890
142863 142764 142852 142860 142849 142832 142830 142830 142825 142814 142824 142817 142904 142881 142829
142876 142855 142847 142827 142858 142856 142834 142880 142863 142806 142823 142775 142911 142875 142908
142878 142883 142864 142715 142843 142746 142803 142833 142790 142847 142836 142857 142980 142986 142890
142882 142856 142880 142874 142874 142720 142790 142844 142795 142759 142841 142830 142917 142836 142847
142907 142889 142850 142872 142847 142897 142826 142825 142841 142833 142842 142773 142766 142888 142887
142861 142833 142832 142830 142826 142829 142831 142846 142825 142930 142835 142834 142894 142886 142883
142881 142877 142841 142851 142734 142864 142840 142829 142781 142774 142841 142847 142761 142839 142887
142877 142902 142831 142830 142857 142739 142829 142771 142778 142777 142839 142788 142849 142850 142891
142884 142895 142812 142881 142869 142808 142775 142774 142851 142775 142848 142756 142847 142835 142848
142923 142833 142834 142850 142842 142792 142792 142844 142833 142761 142847 142791 142903 142901 142888
142869 142866 142855 142687 142849 142762 142799 142866 142853 142757 142789 142815 142931 142854 142887
142880 142897 142896 142848 142848 142824 142822 142898 142828 142677 142827 142833 142900 142905 142913
142867 142908 142867 142830 142832 142854 142834 142828 142837 142816 142841 142773 142840 142838 142850
142862 142851 142848 142865 142865 142732 142802 142894 142837 142807 142837 142855 142840 142834 142833
142852 142846 142813 142827 142828 142826 142808 142894 142825 142810 142840 142850 142767 142838 142840
142895 142835 142858 142852 142860 142736 142829 142836 142832 142838 142836 142764 142905 142833 142875
142875 142849 142867 142719 142740 142730 142803 142824 142786 142712 142839 142757 142852 142838 142874
142879 142863 142848 142859 142876 142877 142838 142807 142837 142758 142845 142786 142857 142843 142889
142868 142853 142846 142857 142865 142837 142820 142855 142830 142830 142831 142762 142758 142838 142811

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 142743 bytes 100%
1,000 142718 bytes -25 bytes 100%
10,000 142693 bytes -25 bytes 100%
100,000 142679 bytes -14 bytes 0.58%
1,000,000 142677 bytes -2 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
142825 bytes +148 bytes (+0.10%)
143379 bytes +702 bytes (+0.49%) +554 bytes
143310 bytes +633 bytes (+0.44%) +485 bytes
143144 bytes +467 bytes (+0.33%) +319 bytes
143065 bytes +388 bytes (+0.27%) +240 bytes
143051 bytes +374 bytes (+0.26%) +226 bytes
142975 bytes +298 bytes (+0.21%) +150 bytes
142906 bytes +229 bytes (+0.16%) +81 bytes
142893 bytes +216 bytes (+0.15%) +68 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 95743 bytes -46934 bytes (-32.90%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 110366 bytes -32311 bytes (-22.65%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 115743 bytes -26934 bytes (-18.88%)
Brotli (Wikipedia) brotli brotli -q 11 121238 bytes -21439 bytes (-15.03%)
LZMA2 (Wikipedia) xz xz -9 121824 bytes -20853 bytes (-14.62%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 127144 bytes -15533 bytes (-10.89%)
Zstandard (Wikipedia) zstd zstd -19 127919 bytes -14758 bytes (-10.34%)

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