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

After GZIP compression these minified files vary in size:
unpkg
  179864 bytes (175.6k)
CDN
cdnjs
  145870 bytes (142.5k)
CDN
gzip -6 (default)
  144227 bytes (140.8k)
local copy
jsdelivr
  144223 bytes (140.8k)
CDN
gzip -9
  143725 bytes (140.4k)
local copy
libdeflate -12
  138906 bytes (135.7k)
local copy
7zip -mx=9 -tgzip
  138819 bytes (135.6k)
local copy
zultra
  138806 bytes (135.6k)
local copy
kzip -s0 -rn -b0
  138503 bytes (135.3k)
local copy
pigz -11 -n
  138454 bytes (135.2k)
local copy
Zopfli
  138385 bytes (135.1k)
local copy
Zopfli (defluff)
  138382 bytes (135.1k)
local copy

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

You will automatically get the smallest ThreeJS 107 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 5838 bytes by using my ThreeJS 107 Zopfli version instead of the best available CDN (4.22% smaller than jsdelivr, 138385 vs. 144223 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 --mls64 --bsr15 --lazy --ohh

(found August 6, 2019)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 64  --mls64
block splitting recursion 15  --bsr15
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 (138382 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/r107/build/three.min.js --location | md5sum
c25d8852fd9d967385b2aca3aaac96ec  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r107.min.zopfli.js.gz | md5sum
c25d8852fd9d967385b2aca3aaac96ec  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 179864 bytes c25d8852fd9d967385b2aca3aaac96ec (invalid)
cdnjs 145870 bytes c25d8852fd9d967385b2aca3aaac96ec (invalid)
jsdelivr 144223 bytes c25d8852fd9d967385b2aca3aaac96ec August 5, 2019 @ 07:44

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
138385 bytes -4 bytes zopfli --i1000000 --mls64 --bsr15 --lazy --ohh August 6, 2019 @ 18:01
138389 bytes -7 bytes zopfli --i100000 --mls64 --bsr15 --lazy --ohh August 5, 2019 @ 11:55
138396 bytes -29 bytes zopfli --i10000 --mls64 --bsr15 --lazy --ohh August 5, 2019 @ 08:53
138425 bytes -15 bytes zopfli --i1000 --mls64 --bsr15 --lazy --ohh August 5, 2019 @ 08:20
138440 bytes -10 bytes zopfli --i1000 --mls512 --bsr40 --lazy --ohh August 5, 2019 @ 08:18
138450 bytes zopfli --i100 --mls64 --bsr15 --lazy --ohh August 5, 2019 @ 08:02

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

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
138630 138649 138676 138631 138643 138620 138634 138624 138641 138531 138584 138676 138665 138640 138610
138612 138569 138569 138564 138610 138481 138612 138495 138480 138583 138589 138586 138640 138630 138561
138592 138595 138577 138563 138540 138575 138554 138510 138585 138674 138549 138518 138679 138654 138588
138592 138595 138588 138584 138599 138561 138460 138596 138557 138579 138575 138548 138656 138715 138696
138598 138644 138639 138583 138571 138598 138544 138502 138544 138554 138549 138567 138558 138625 138552
138543 138581 138559 138611 138592 138537 138544 138546 138546 138657 138645 138726 138620 138649 138672
138597 138648 138623 138587 138561 138498 138528 138565 138537 138550 138552 138661 138578 138652 138616
138580 138592 138583 138598 138538 138541 138553 138502 138544 138613 138620 138676 138696 138623 138615
138593 138632 138619 138542 138590 138591 138565 138574 138581 138574 138613 138552 138671 138613 138600
138564 138589 138590 138568 138582 138558 138542 138524 138543 138683 138654 138727 138669 138650 138644
138595 138589 138586 138607 138583 138541 138519 138496 138495 138527 138550 138539 138594 138626 138598
138567 138587 138592 138543 138587 138385 138536 138583 138553 138551 138541 138550 138619 138612 138605
138569 138589 138590 138536 138543 138574 138466 138547 138553 138606 138542 138554 138592 138602 138601
138534 138593 138586 138537 138590 138560 138535 138574 138495 138642 138540 138614 138636 138611 138616
138561 138647 138628 138544 138577 138599 138547 138559 138548 138618 138544 138556 138607 138575 138608
138603 138591 138603 138546 138532 138538 138545 138548 138504 138669 138658 138617 138637 138616 138589
138565 138642 138586 138542 138537 138583 138573 138569 138569 138545 138551 138547 138623 138598 138603
138550 138561 138595 138543 138603 138552 138572 138570 138501 138614 138612 138652 138639 138618 138622
138596 138622 138534 138613 138576 138556 138552 138497 138544 138495 138539 138554 138682 138610 138610
138550 138596 138547 138536 138628 138393 138553 138497 138546 138548 138542 138552 138638 138625 138590
138591 138597 138592 138538 138598 138552 138527 138554 138588 138662 138545 138683 138636 138648 138600
138555 138572 138580 138584 138631 138586 138551 138569 138545 138666 138543 138543 138639 138633 138609
138592 138626 138531 138610 138598 138585 138541 138571 138427 138650 138540 138552 138615 138614 138612

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 138450 bytes 100%
1,000 138425 bytes -25 bytes 100%
10,000 138396 bytes -29 bytes 100%
100,000 138389 bytes -7 bytes 0.58%
1,000,000 138385 bytes -4 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
138503 bytes +118 bytes (+0.09%)
139054 bytes +669 bytes (+0.48%) +551 bytes
139049 bytes +664 bytes (+0.48%) +546 bytes
138886 bytes +501 bytes (+0.36%) +383 bytes
138756 bytes +371 bytes (+0.27%) +253 bytes
138761 bytes +376 bytes (+0.27%) +258 bytes
138695 bytes +310 bytes (+0.22%) +192 bytes
138683 bytes +298 bytes (+0.22%) +180 bytes
138612 bytes +227 bytes (+0.16%) +109 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 92544 bytes -45841 bytes (-33.13%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 106432 bytes -31953 bytes (-23.09%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 111719 bytes -26666 bytes (-19.27%)
Brotli (Wikipedia) brotli brotli -q 11 117141 bytes -21244 bytes (-15.35%)
LZMA2 (Wikipedia) xz xz -9 118040 bytes -20345 bytes (-14.70%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 122584 bytes -15801 bytes (-11.42%)
Zstandard (Wikipedia) zstd zstd -19 123934 bytes -14451 bytes (-10.44%)

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.