Choose a version:
45% The original file has 1067290 bytes (1,042.3k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 480350 bytes (469.1k, 45%).

After GZIP compression these minified files vary in size:
Boot
  149325 bytes (145.8k)
CDN
cdnjs
  125752 bytes (122.8k)
CDN
cdnhttps
  124639 bytes (121.7k)
CDN
unpkg
  124639 bytes (121.7k)
CDN
Google
  124452 bytes (121.5k)
CDN
gzip -6 (default)
  124401 bytes (121.5k)
local copy
jsdelivr
  124356 bytes (121.4k)
CDN
gzip -9
  124014 bytes (121.1k)
local copy
libdeflate -12
  119769 bytes (117.0k)
local copy
7zip -mx=9 -tgzip
  119680 bytes (116.9k)
local copy
pigz -11 -n
  119432 bytes (116.6k)
local copy
kzip -s0 -rn -b0
  119423 bytes (116.6k)
local copy
Zopfli
  119357 bytes (116.6k)
local copy
Zopfli (defluff)
  119355 bytes (116.6k)
local copy

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

You will automatically get the smallest ThreeJS 81 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 4999 bytes by using my ThreeJS 81 Zopfli version instead of the best available CDN (4.19% smaller than jsdelivr, 119357 vs. 124356 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 --mls128 --bsr20 --lazy --ohh

(found September 18, 2016)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 128  --mls128
block splitting recursion 20  --bsr20
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 (119355 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/r81/build/three.min.js --location | md5sum
46a688c7e13e52123da51c241bf681ad  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r81.min.zopfli.js.gz | md5sum
46a688c7e13e52123da51c241bf681ad  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 149325 bytes 46a688c7e13e52123da51c241bf681ad September 21, 2016 @ 17:24
cdnjs 125752 bytes 46a688c7e13e52123da51c241bf681ad (invalid)
cdnhttps 124639 bytes 46a688c7e13e52123da51c241bf681ad November 22, 2016 @ 16:41
unpkg 124639 bytes 46a688c7e13e52123da51c241bf681ad September 16, 2016 @ 11:23
Google 124452 bytes 46a688c7e13e52123da51c241bf681ad December 20, 2016 @ 14:06
jsdelivr 124356 bytes 46a688c7e13e52123da51c241bf681ad February 19, 2018 @ 16:22

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

Other Versions

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

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
119357 bytes -2 bytes zopfli --i1000000 --mls128 --bsr20 --lazy --ohh September 18, 2016 @ 01:24
119359 bytes -8 bytes zopfli --i100000 --mls128 --bsr20 --lazy --ohh September 16, 2016 @ 16:05
119367 bytes -12 bytes zopfli --i10000 --mls128 --bsr20 --lazy --ohh September 16, 2016 @ 13:06
119379 bytes -15 bytes zopfli --i1000 --mls128 --bsr20 --lazy --ohh September 16, 2016 @ 12:38
119394 bytes zopfli --i100 --mls128 --bsr20 --lazy --ohh September 16, 2016 @ 11:47

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

Most recent activity on February 19, 2018 @ 16:22.

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
119543 119541 119509 119545 119549 119520 119514 119575 119620 119526 119555 119552 119551 119562 119526
119629 119601 119600 119621 119580 119542 119626 119587 119490 119587 119599 119595 119490 119579 119543
119579 119439 119590 119466 119466 119483 119514 119456 119489 119488 119533 119464 119442 119397 119478
119445 119454 119456 119459 119460 119517 119481 119438 119517 119512 119443 119455 119473 119507 119472
119437 119459 119453 119452 119435 119492 119491 119454 119436 119518 119461 119492 119465 119478 119506
119438 119439 119465 119459 119446 119453 119493 119430 119422 119422 119424 119446 119458 119550 119467
119435 119428 119501 119457 119421 119453 119477 119446 119446 119519 119455 119454 119483 119484 119466
119428 119430 119452 119457 119417 119444 119458 119536 119436 119494 119458 119474 119478 119512 119477
119433 119432 119457 119447 119416 119425 119474 119440 119434 119374 119465 119435 119453 119526 119470
119429 119433 119458 119456 119420 119476 119484 119441 119432 119407 119414 119465 119444 119481 119473
119441 119451 119451 119443 119449 119430 119480 119431 119435 119418 119455 119462 119450 119481 119472
119434 119431 119458 119464 119462 119481 119453 119469 119429 119500 119453 119465 119449 119465 119463
119446 119430 119454 119451 119443 119457 119519 119446 119439 119497 119504 119505 119506 119521 119472
119436 119434 119455 119449 119416 119456 119475 119499 119407 119426 119461 119499 119472 119460 119465
119444 119443 119428 119450 119431 119455 119428 119434 119441 119435 119458 119463 119461 119481 119467
119452 119436 119451 119454 119443 119428 119496 119474 119368 119515 119428 119522 119449 119416 119401
119429 119442 119454 119450 119434 119493 119357 119472 119432 119434 119439 119461 119461 119529 119501
119436 119430 119454 119451 119421 119458 119483 119425 119427 119490 119530 119442 119464 119483 119466
119436 119435 119449 119453 119504 119458 119503 119437 119438 119426 119433 119397 119451 119464 119464
119431 119441 119458 119454 119461 119455 119490 119441 119468 119482 119456 119441 119473 119462 119489
119431 119435 119454 119451 119423 119445 119515 119481 119429 119472 119525 119493 119499 119480 119464
119434 119440 119453 119458 119422 119423 119512 119455 119429 119442 119500 119494 119501 119483 119486
119437 119429 119423 119431 119419 119424 119427 119383 119430 119484 119419 119398 119453 119459 119484

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 119394 bytes 100%
1,000 119379 bytes -15 bytes 100%
10,000 119367 bytes -12 bytes 100%
100,000 119359 bytes -8 bytes 0.87%
1,000,000 119357 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
119423 bytes +66 bytes (+0.06%)
119925 bytes +568 bytes (+0.48%) +502 bytes
119896 bytes +539 bytes (+0.45%) +473 bytes
119757 bytes +400 bytes (+0.34%) +334 bytes
119698 bytes +341 bytes (+0.29%) +275 bytes
119580 bytes +223 bytes (+0.19%) +157 bytes
119585 bytes +228 bytes (+0.19%) +162 bytes
119535 bytes +178 bytes (+0.15%) +112 bytes
119506 bytes +149 bytes (+0.12%) +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 81348 bytes -38009 bytes (-31.84%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 93222 bytes -26135 bytes (-21.90%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 99999 bytes -19358 bytes (-16.22%)
Brotli (Wikipedia) brotli brotli -q 11 102326 bytes -17031 bytes (-14.27%)
LZMA2 (Wikipedia) xz xz -9 102984 bytes -16373 bytes (-13.72%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 106966 bytes -12391 bytes (-10.38%)
Zstandard (Wikipedia) zstd zstd -19 108895 bytes -10462 bytes (-8.77%)

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