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

After GZIP compression these minified files vary in size:
Boot
  123686 bytes (120.8k)
CDN
cdnjs
  102981 bytes (100.6k)
CDN
unpkg
  102205 bytes (99.8k)
CDN
gzip -6 (default)
  101856 bytes (99.5k)
local copy
Google
  101817 bytes (99.4k)
CDN
gzip -9
  101394 bytes (99.0k)
local copy
libdeflate -12
  97889 bytes (95.6k)
local copy
zultra
  97784 bytes (95.5k)
local copy
7zip -mx=9 -tgzip
  97774 bytes (95.5k)
local copy
pigz -11 -n
  97528 bytes (95.2k)
local copy
kzip -s0 -rn -b0
  97520 bytes (95.2k)
local copy
Zopfli
  97447 bytes (95.2k)
local copy
Zopfli (defluff)
  97444 bytes (95.2k)
local copy

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

You will automatically get the smallest ThreeJS 68 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 4370 bytes by using my ThreeJS 68 Zopfli version instead of the best available CDN (4.48% smaller than Google, 97447 vs. 101817 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 --mls16384 --bsr6 --lazy --ohh

(found January 28, 2017)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 16384  --mls16384
block splitting recursion 6  --bsr6
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 (97444 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/r68/build/three.min.js --location | md5sum
4fa25eda7fd3859657aeada35062a506  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r68.min.zopfli.js.gz | md5sum
4fa25eda7fd3859657aeada35062a506  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 123686 bytes 4fa25eda7fd3859657aeada35062a506 (invalid)
cdnjs 102981 bytes 4fa25eda7fd3859657aeada35062a506 (invalid)
Google 101817 bytes 4fa25eda7fd3859657aeada35062a506 (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
unpkg 102205 bytes 1c919aa8e233c5c5f98d9c7e04e3ec82 < // threejs.org/license
> var self = self || {};// threejs.org/license
>
> // Export the THREE object for **Node.js**, with
> // backwards-compatibility for the old `require()` API. If [...]
> // the browser, add `_` as a global object via a string id [...]
> // for Closure Compiler "advanced" mode.
> if (typeof exports !== 'undefined') {
> if (typeof module !== 'undefined' && module.exports) {
> exports = module.exports = THREE;
[...]
July 11, 2016 @ 15:49

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
97447 bytes -7 bytes zopfli --i1000000 --mls16384 --bsr6 --lazy --ohh January 28, 2017 @ 13:07
97454 bytes -8 bytes zopfli --i100000 --mls16384 --bsr6 --lazy --ohh December 29, 2015 @ 10:58
97462 bytes -10 bytes zopfli --i10000 --mls16384 --bsr6 --lazy --ohh November 16, 2015 @ 02:32
97472 bytes -10 bytes zopfli --i1000 --mls16384 --bsr6 --lazy --ohh November 15, 2015 @ 18:07
97482 bytes -9 bytes zopfli --i1000 --mls32768 --bsr23 --lazy --ohh November 15, 2015 @ 18:04
97491 bytes -4 bytes zopfli --i1000 --mls32 --bsr19 --lazy --ohh November 15, 2015 @ 17:55
97495 bytes -6 bytes zopfli --i1000 --mls2048 --bsr11 --lazy --ohh November 15, 2015 @ 17:51
97501 bytes zopfli --i100 --mls16384 --bsr6 --lazy --ohh November 15, 2015 @ 12:45

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
97655 97652 97653 97701 97660 97693 97667 97704 97726 97676 97738 97704 97703 97638 97764
97529 97669 97528 97529 97533 97532 97507 97520 97528 97541 97635 97534 97531 97523 97718
97529 97536 97535 97560 97523 97534 97564 97713 97715 97546 97733 97734 97537 97447 97700
97528 97522 97552 97534 97561 97508 97510 97517 97528 97534 97488 97684 97509 97515 97727
97565 97529 97536 97537 97539 97523 97486 97656 97660 97527 97499 97659 97532 97505 97520
97625 97644 97626 97616 97631 97652 97618 97544 97492 97620 97507 97688 97615 97526 97708
97666 97639 97640 97617 97503 97508 97622 97661 97649 97645 97721 97682 97509 97512 97552
97629 97661 97631 97640 97600 97631 97595 97493 97530 97526 97488 97528 97534 97502 97719
97580 97547 97531 97533 97532 97509 97561 97541 97505 97537 97556 97683 97546 97514 97496
97522 97528 97529 97522 97536 97526 97507 97508 97509 97569 97711 97517 97530 97510 97724
97528 97530 97518 97529 97548 97556 97560 97524 97544 97568 97526 97687 97531 97516 97507
97538 97548 97551 97549 97552 97511 97536 97512 97524 97555 97511 97684 97529 97517 97506
97528 97530 97506 97522 97524 97552 97529 97525 97546 97528 97718 97686 97510 97513 97486
97525 97532 97516 97535 97537 97523 97559 97654 97492 97563 97562 97689 97507 97512 97549
97511 97532 97558 97533 97500 97556 97537 97548 97519 97571 97528 97688 97527 97515 97520
97522 97520 97524 97527 97479 97487 97523 97646 97527 97534 97497 97688 97509 97514 97512
97526 97526 97525 97553 97513 97518 97540 97653 97518 97560 97553 97687 97544 97485 97491
97520 97523 97520 97531 97500 97554 97530 97531 97532 97568 97542 97541 97534 97511 97483
97522 97525 97521 97526 97529 97519 97531 97519 97533 97534 97532 97698 97513 97514 97550
97527 97531 97525 97528 97522 97521 97536 97489 97522 97561 97507 97679 97506 97512 97464
97529 97524 97519 97524 97521 97523 97535 97517 97520 97537 97564 97680 97511 97514 97508
97527 97529 97520 97522 97531 97515 97540 97533 97529 97538 97534 97687 97511 97516 97552
97525 97527 97528 97533 97516 97523 97524 97517 97500 97533 97526 97688 97530 97483 97556

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 97501 bytes 100%
1,000 97472 bytes -29 bytes 100%
10,000 97462 bytes -10 bytes 100%
100,000 97454 bytes -8 bytes 0.58%
1,000,000 97447 bytes -7 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
97520 bytes +73 bytes (+0.07%)
97978 bytes +531 bytes (+0.54%) +458 bytes
97981 bytes +534 bytes (+0.55%) +461 bytes
97811 bytes +364 bytes (+0.37%) +291 bytes
97717 bytes +270 bytes (+0.28%) +197 bytes
97728 bytes +281 bytes (+0.29%) +208 bytes
97675 bytes +228 bytes (+0.23%) +155 bytes
97580 bytes +133 bytes (+0.14%) +60 bytes
97603 bytes +156 bytes (+0.16%) +83 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 66625 bytes -30822 bytes (-31.63%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 76817 bytes -20630 bytes (-21.17%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 81261 bytes -16186 bytes (-16.61%)
Brotli (Wikipedia) brotli brotli -q 11 83443 bytes -14004 bytes (-14.37%)
LZMA2 (Wikipedia) xz xz -9 84144 bytes -13303 bytes (-13.65%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 89169 bytes -8278 bytes (-8.49%)
Zstandard (Wikipedia) zstd zstd -19 89581 bytes -7866 bytes (-8.07%)

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.