Choose a version:
49% The original file has 821300 bytes (802.1k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 405491 bytes (396.0k, 49%).

After GZIP compression these minified files vary in size:
Boot
  119346 bytes (116.5k)
CDN, direct link
cdnjs
  100552 bytes (98.2k)
CDN, direct link
gzip -6 (default)
  99492 bytes (97.2k)
local copy
cdnhttps
  99435 bytes (97.1k)
CDN, direct link
gzip -9
  99068 bytes (96.7k)
local copy
libdeflate -12
  96007 bytes (93.8k)
local copy
7zip -mx=9 -tgzip
  95910 bytes (93.7k)
local copy
pigz -11 -n
  95700 bytes (93.5k)
local copy
kzip -s0 -rn -b0
  95681 bytes (93.4k)
local copy
Zopfli
  95521 bytes (93.3k)
local copy
Zopfli (defluff)
  95515 bytes (93.3k)
local copy

perma-link to the smallest file on my server:
http://minime.stephan-brumme.com/files/threejs/three-r51.min.js

You will automatically get the smallest ThreeJS 51 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 3914 bytes by using my ThreeJS 51 Zopfli version instead of the best available CDN (4.10% smaller than cdnhttps, 95521 vs. 99435 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 --mls32768 --bsr13 --lazy --ohh

(found February 17, 2017)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 32768  --mls32768
block splitting recursion 13  --bsr13
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 6 more bytes (95515 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/r51/build/three.min.js --location | md5sum
af85954d36dee4b33ff1056c17686fc6  -
curl --silent --compressed http://minime.stephan-brumme.com/files/threejs/three-r51.min.zopfli.js.gz | md5sum
af85954d36dee4b33ff1056c17686fc6  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 119346 bytes af85954d36dee4b33ff1056c17686fc6 (invalid)
cdnjs 100552 bytes af85954d36dee4b33ff1056c17686fc6 (invalid)
cdnhttps 99435 bytes af85954d36dee4b33ff1056c17686fc6 December 24, 2015 @ 07:36

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

Other Versions

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

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
95521 bytes -1 byte zopfli --i1000000 --mls32768 --bsr13 --lazy --ohh February 17, 2017 @ 11:38
95522 bytes -7 bytes zopfli --i100000 --mls32768 --bsr13 --lazy --ohh December 22, 2015 @ 20:05
95529 bytes -14 bytes zopfli --i10000 --mls32768 --bsr13 --lazy --ohh November 16, 2015 @ 10:07
95543 bytes -12 bytes zopfli --i1000 --mls32768 --bsr13 --lazy --ohh November 16, 2015 @ 09:29
95555 bytes zopfli --i100 --mls32768 --bsr13 --lazy --ohh November 15, 2015 @ 10:16

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

Most recent activity on February 18, 2017 @ 05:57.

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
95622 95616 95616 95708 95601 95608 95646 95602 95651 95640 95646 95746 95744 95761 95755
95685 95709 95711 95669 95620 95600 95599 95613 95623 95625 95635 95724 95623 95726 95726
95695 95631 95623 95623 95610 95620 95622 95616 95577 95578 95560 95737 95709 95715 95714
95728 95669 95714 95682 95693 95681 95686 95688 95638 95671 95615 95610 95614 95712 95565
95669 95687 95651 95651 95611 95608 95607 95617 95588 95652 95629 95625 95614 95716 95551
95712 95602 95594 95712 95598 95599 95617 95654 95583 95582 95677 95612 95688 95723 95545
95686 95638 95594 95693 95603 95582 95626 95609 95640 95631 95631 95615 95629 95723 95550
95597 95586 95662 95611 95617 95588 95623 95601 95591 95581 95571 95717 95572 95721 95543
95682 95659 95660 95583 95608 95583 95624 95596 95697 95656 95621 95621 95592 95713 95725
95627 95589 95632 95650 95608 95586 95595 95628 95583 95587 95674 95596 95691 95715 95521
95709 95665 95664 95660 95645 95634 95619 95593 95588 95593 95624 95610 95616 95715 95544
95635 95607 95644 95597 95581 95585 95603 95598 95580 95580 95616 95618 95612 95543 95537
95634 95587 95667 95580 95597 95599 95624 95605 95601 95657 95606 95716 95563 95714 95548
95623 95661 95583 95584 95599 95581 95586 95597 95585 95616 95612 95618 95681 95714 95545
95622 95663 95623 95588 95597 95591 95578 95592 95595 95653 95592 95617 95594 95710 95551
95624 95595 95592 95598 95598 95586 95625 95576 95581 95606 95603 95615 95608 95715 95552
95629 95586 95584 95585 95638 95599 95632 95586 95601 95580 95595 95618 95609 95714 95547
95676 95618 95628 95584 95589 95599 95586 95606 95608 95580 95649 95610 95649 95714 95542
95605 95581 95622 95639 95579 95576 95595 95596 95585 95583 95611 95623 95594 95560 95524
95617 95594 95592 95637 95606 95590 95578 95613 95597 95585 95619 95622 95598 95710 95594
95682 95667 95627 95652 95598 95660 95591 95615 95599 95597 95551 95611 95610 95716 95549
95615 95589 95591 95594 95597 95580 95611 95603 95581 95576 95611 95537 95599 95540 95542
95659 95589 95617 95584 95583 95580 95595 95596 95593 95583 95612 95713 95595 95714 95542

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 95555 bytes 100%
1,000 95543 bytes -12 bytes 100%
10,000 95529 bytes -14 bytes 100%
100,000 95522 bytes -7 bytes 0.58%
1,000,000 95521 bytes -1 byte 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
95681 bytes +160 bytes (+0.17%)
95838 bytes +317 bytes (+0.33%) +157 bytes
95775 bytes +254 bytes (+0.27%) +94 bytes
95793 bytes +272 bytes (+0.28%) +112 bytes
95780 bytes +259 bytes (+0.27%) +99 bytes
95747 bytes +226 bytes (+0.24%) +66 bytes
95730 bytes +209 bytes (+0.22%) +49 bytes
95734 bytes +213 bytes (+0.22%) +53 bytes
95737 bytes +216 bytes (+0.23%) +56 bytes

Non-DEFLATE Algorithms

Archivers based on completely different compression algorithms often produce superior results.
Unfortunately, browsers only support gzip compression at the moment.
Algorithm Program Parameters Size Compared To Best Zopfli
ZPAQ (Wikipedia) zpaq zpaq -method 69 64448 bytes -31073 bytes (-32.53%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 74955 bytes -20566 bytes (-21.53%)
Brotli (Wikipedia) brotli brotli -q 11 80378 bytes -15143 bytes (-15.85%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 80554 bytes -14967 bytes (-15.67%)
LZMA2 (Wikipedia) xz xz -9 80800 bytes -14721 bytes (-15.41%)
ZSTD (Wikipedia) zstd zstd -19 86266 bytes -9255 bytes (-9.69%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 87112 bytes -8409 bytes (-8.80%)

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