Choose a version:
51% The original file has 813502 bytes (794.4k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 410858 bytes (401.2k, 51%).

After GZIP compression these minified files vary in size:
Boot
  119523 bytes (116.7k)
CDN
cdnjs
  99716 bytes (97.4k)
CDN
gzip -6 (default)
  98753 bytes (96.4k)
local copy
gzip -9
  98346 bytes (96.0k)
local copy
libdeflate -12
  95084 bytes (92.9k)
local copy
zultra
  95025 bytes (92.8k)
local copy
7zip -mx=9 -tgzip
  94973 bytes (92.7k)
local copy
pigz -11 -n
  94684 bytes (92.5k)
local copy
kzip -s0 -rn -b0
  94602 bytes (92.4k)
local copy
Zopfli
  94539 bytes (92.3k)
local copy
Zopfli (defluff)
  94537 bytes (92.3k)
local copy

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

You will automatically get the smallest ThreeJS 61 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 5177 bytes by using my ThreeJS 61 Zopfli version instead of the best available CDN (5.48% smaller than cdnjs, 94539 vs. 99716 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 --mls512 --bsr22 --lazy --ohh

(found February 7, 2017)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 512  --mls512
block splitting recursion 22  --bsr22
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 (94537 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/r61/build/three.min.js --location | md5sum
1a3257293bd9785fa7905dfa7f2ecf33  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r61.min.zopfli.js.gz | md5sum
1a3257293bd9785fa7905dfa7f2ecf33  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 119523 bytes 1a3257293bd9785fa7905dfa7f2ecf33 (invalid)
cdnjs 99716 bytes 1a3257293bd9785fa7905dfa7f2ecf33 (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
94539 bytes -6 bytes zopfli --i1000000 --mls512 --bsr22 --lazy --ohh February 7, 2017 @ 03:44
94545 bytes -7 bytes zopfli --i100000 --mls512 --bsr22 --lazy --ohh December 28, 2015 @ 20:30
94552 bytes -10 bytes zopfli --i10000 --mls512 --bsr22 --lazy --ohh November 17, 2015 @ 13:10
94562 bytes -5 bytes zopfli --i10000 --mls4096 --bsr12 --lazy --ohh November 17, 2015 @ 11:08
94567 bytes -27 bytes zopfli --i1000 --mls512 --bsr22 --lazy --ohh November 16, 2015 @ 17:18
94594 bytes zopfli --i100 --mls512 --bsr22 --lazy --ohh November 15, 2015 @ 10:49

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

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
94711 94713 94711 94695 94689 94694 94679 94702 94640 94709 94651 94628 94672 94669 94664
94649 94648 94636 94645 94634 94641 94650 94611 94606 94596 94630 94616 94674 94660 94659
94723 94634 94744 94640 94652 94751 94655 94652 94573 94638 94621 94660 94599 94666 94759
94736 94719 94720 94628 94689 94630 94637 94618 94779 94623 94579 94637 94616 94631 94657
94719 94738 94723 94780 94625 94714 94629 94709 94623 94685 94658 94658 94634 94668 94653
94744 94697 94692 94702 94631 94742 94632 94679 94629 94633 94686 94638 94576 94681 94708
94724 94722 94728 94771 94741 94619 94722 94622 94622 94703 94600 94661 94657 94656 94639
94724 94728 94752 94636 94632 94716 94690 94705 94644 94696 94641 94660 94632 94662 94736
94716 94715 94715 94709 94674 94628 94637 94712 94637 94622 94588 94556 94572 94651 94659
94727 94715 94725 94711 94693 94629 94689 94620 94696 94686 94608 94640 94653 94642 94657
94730 94722 94718 94687 94628 94690 94632 94680 94631 94638 94663 94641 94641 94715 94640
94646 94696 94695 94627 94621 94629 94678 94616 94601 94632 94602 94655 94599 94632 94637
94661 94659 94617 94636 94694 94691 94687 94614 94621 94641 94638 94641 94657 94675 94644
94721 94721 94724 94696 94623 94682 94630 94692 94685 94624 94628 94647 94600 94627 94640
94717 94720 94706 94707 94623 94630 94632 94693 94631 94623 94595 94664 94657 94653 94662
94644 94718 94654 94635 94681 94690 94705 94683 94625 94635 94624 94631 94678 94658 94650
94721 94718 94746 94655 94616 94630 94690 94614 94640 94628 94592 94637 94604 94658 94658
94736 94719 94803 94691 94737 94737 94736 94683 94625 94697 94608 94658 94656 94714 94644
94825 94725 94722 94750 94788 94729 94787 94683 94539 94656 94607 94654 94583 94713 94646
94657 94635 94714 94705 94637 94698 94697 94708 94644 94626 94649 94648 94629 94656 94639
94729 94723 94628 94630 94686 94628 94629 94683 94644 94627 94593 94647 94639 94689 94656
94727 94719 94631 94692 94619 94626 94630 94619 94597 94684 94623 94665 94643 94687 94645
94727 94717 94716 94636 94624 94624 94720 94708 94650 94689 94592 94641 94629 94719 94637

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 94594 bytes 100%
1,000 94567 bytes -27 bytes 100%
10,000 94552 bytes -15 bytes 100%
100,000 94545 bytes -7 bytes 0.58%
1,000,000 94539 bytes -6 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
94602 bytes +63 bytes (+0.07%)
95067 bytes +528 bytes (+0.56%) +465 bytes
94942 bytes +403 bytes (+0.43%) +340 bytes
94942 bytes +403 bytes (+0.43%) +340 bytes
94829 bytes +290 bytes (+0.31%) +227 bytes
94785 bytes +246 bytes (+0.26%) +183 bytes
94805 bytes +266 bytes (+0.28%) +203 bytes
94699 bytes +160 bytes (+0.17%) +97 bytes
94665 bytes +126 bytes (+0.13%) +63 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 - for example, your browser actually supports it !
Algorithm Program Parameters Size Compared To Best Zopfli
ZPAQ (Wikipedia) zpaq zpaq -method 69 64738 bytes -29801 bytes (-31.52%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 74424 bytes -20115 bytes (-21.28%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 79571 bytes -14968 bytes (-15.83%)
Brotli (Wikipedia) brotli brotli -q 11 80758 bytes -13781 bytes (-14.58%)
LZMA2 (Wikipedia) xz xz -9 81284 bytes -13255 bytes (-14.02%)
Zstandard (Wikipedia) zstd zstd -19 86389 bytes -8150 bytes (-8.62%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 86873 bytes -7666 bytes (-8.11%)

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.