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

After GZIP compression these minified files vary in size:
unpkg
  188533 bytes (184.1k)
CDN
gzip -6 (default)
  154037 bytes (150.4k)
local copy
jsdelivr
  153857 bytes (150.3k)
CDN
gzip -9
  153450 bytes (149.9k)
local copy
libdeflate -12
  148053 bytes (144.6k)
local copy
zultra
  147923 bytes (144.5k)
local copy
7zip -mx=9 -tgzip
  147912 bytes (144.4k)
local copy
kzip -s0 -rn -b0
  147521 bytes (144.1k)
local copy
pigz -11 -n
  147515 bytes (144.1k)
local copy
Zopfli
  147497 bytes (144.0k)
local copy
Zopfli (defluff)
  147494 bytes (144.0k)
local copy

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

You will automatically get the smallest ThreeJS 117 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 6360 bytes by using my ThreeJS 117 Zopfli version instead of the best available CDN (4.31% smaller than jsdelivr, 147497 vs. 153857 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 --bsr25 --lazy --ohh

(found June 5, 2020)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 1024  --mls1024
block splitting recursion 25  --bsr25
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 (147494 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/r117/build/three.min.js --location | md5sum
3c9e46df573aa34fc94cf2a2667b0c19  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r117.min.zopfli.js.gz | md5sum
3c9e46df573aa34fc94cf2a2667b0c19  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 188533 bytes 3c9e46df573aa34fc94cf2a2667b0c19 (invalid)
jsdelivr 153857 bytes 3c9e46df573aa34fc94cf2a2667b0c19 June 3, 2020 @ 15:37

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
147497 bytes -5 bytes zopfli --i1000000 --mls1024 --bsr25 --lazy --ohh June 5, 2020 @ 16:45
147502 bytes -11 bytes zopfli --i100000 --mls1024 --bsr25 --lazy --ohh June 3, 2020 @ 20:49
147513 bytes -11 bytes zopfli --i10000 --mls1024 --bsr25 --lazy --ohh June 3, 2020 @ 18:04
147524 bytes -33 bytes zopfli --i1000 --mls1024 --bsr25 --lazy --ohh June 3, 2020 @ 16:17
147557 bytes -5 bytes zopfli --i1000 --mls1024 --bsr11 --lazy --ohh June 3, 2020 @ 16:11
147562 bytes zopfli --i100 --mls1024 --bsr25 --lazy --ohh June 3, 2020 @ 15:59

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

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
147772 147808 147848 147796 147838 147794 147780 147779 147724 147779 147761 147783 147735 147760 147738
147697 147704 147701 147815 147713 147781 147793 147804 147791 147744 147766 147688 147706 147734 147723
147724 147725 147725 147735 147716 147680 147715 147668 147661 147664 147712 147711 147684 147604 147606
147722 147714 147741 147731 147662 147716 147667 147668 147641 147591 147670 147786 147656 147673 147668
147690 147704 147737 147702 147717 147699 147655 147659 147645 147655 147668 147718 147774 147781 147696
147703 147738 147736 147694 147702 147693 147702 147678 147671 147664 147690 147710 147715 147675 147692
147694 147729 147694 147729 147716 147711 147714 147647 147666 147632 147666 147672 147668 147689 147732
147697 147690 147733 147691 147729 147729 147637 147694 147671 147540 147611 147665 147694 147654 147695
147704 147740 147735 147728 147724 147670 147658 147694 147677 147667 147713 147718 147699 147663 147670
147678 147680 147682 147671 147681 147678 147692 147647 147639 147765 147709 147714 147652 147684 147678
147704 147703 147730 147696 147702 147694 147666 147705 147664 147644 147657 147715 147766 147675 147668
147699 147698 147697 147701 147702 147697 147692 147719 147658 147801 147665 147830 147669 147674 147671
147683 147699 147724 147675 147676 147710 147657 147667 147663 147685 147682 147700 147761 147661 147695
147699 147702 147734 147689 147728 147669 147664 147707 147655 147555 147685 147784 147777 147663 147704
147692 147698 147690 147699 147691 147678 147664 147709 147663 147633 147680 147690 147694 147657 147601
147669 147725 147731 147702 147707 147700 147597 147667 147671 147796 147669 147780 147777 147758 147690
147692 147692 147729 147697 147741 147666 147679 147667 147676 147682 147666 147717 147660 147656 147701
147700 147700 147703 147694 147736 147700 147664 147642 147780 147773 147660 147789 147767 147687 147751
147708 147706 147675 147682 147757 147670 147637 147647 147639 147628 147664 147711 147674 147673 147680
147691 147718 147706 147718 147748 147727 147670 147665 147670 147629 147609 147663 147671 147670 147605
147700 147699 147736 147700 147697 147673 147664 147712 147662 147497 147639 147689 147685 147674 147703
147681 147702 147697 147701 147705 147678 147714 147718 147671 147609 147659 147662 147671 147658 147687
147701 147691 147731 147697 147725 147676 147660 147678 147673 147619 147667 147718 147774 147705 147732

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 147562 bytes 100%
1,000 147524 bytes -38 bytes 100%
10,000 147513 bytes -11 bytes 100%
100,000 147502 bytes -11 bytes 0.58%
1,000,000 147497 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
147521 bytes +24 bytes (+0.02%)
148215 bytes +718 bytes (+0.49%) +694 bytes
148219 bytes +722 bytes (+0.49%) +698 bytes
147972 bytes +475 bytes (+0.32%) +451 bytes
147838 bytes +341 bytes (+0.23%) +317 bytes
147827 bytes +330 bytes (+0.22%) +306 bytes
147773 bytes +276 bytes (+0.19%) +252 bytes
147721 bytes +224 bytes (+0.15%) +200 bytes
147677 bytes +180 bytes (+0.12%) +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 - but your browser doesn't support it.
Algorithm Program Parameters Size Compared To Best Zopfli
ZPAQ (Wikipedia) zpaq zpaq -method 69 98548 bytes -48949 bytes (-33.19%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 114002 bytes -33495 bytes (-22.71%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 119592 bytes -27905 bytes (-18.92%)
Brotli (Wikipedia) brotli brotli -q 11 124957 bytes -22540 bytes (-15.28%)
LZMA2 (Wikipedia) xz xz -9 125832 bytes -21665 bytes (-14.69%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 131116 bytes -16381 bytes (-11.11%)
Zstandard (Wikipedia) zstd zstd -19 132072 bytes -15425 bytes (-10.46%)

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.