Choose a version:
49% The original file has 1090923 bytes (1,065.4k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 539972 bytes (527.3k, 49%).

After GZIP compression these minified files vary in size:
cdnjs
  137600 bytes (134.4k)
CDN
unpkg
  136507 bytes (133.3k)
CDN
gzip -6 (default)
  136130 bytes (132.9k)
local copy
jsdelivr
  136077 bytes (132.9k)
CDN
gzip -9
  135682 bytes (132.5k)
local copy
libdeflate -12
  131089 bytes (128.0k)
local copy
7zip -mx=9 -tgzip
  131058 bytes (128.0k)
local copy
zultra
  130915 bytes (127.8k)
local copy
kzip -s0 -rn -b0
  130715 bytes (127.7k)
local copy
pigz -11 -n
  130680 bytes (127.6k)
local copy
Zopfli
  130575 bytes (127.5k)
local copy
Zopfli (defluff)
  130571 bytes (127.5k)
local copy

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

You will automatically get the smallest ThreeJS 93 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 5502 bytes by using my ThreeJS 93 Zopfli version instead of the best available CDN (4.21% smaller than jsdelivr, 130575 vs. 136077 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 --mls4096 --bsr20 --lazy --ohh

(found June 6, 2018)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 4096  --mls4096
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 4 more bytes (130571 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/r93/build/three.min.js --location | md5sum
11fe0be6e2e0e4d83d4af60fbe8ab598  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r93.min.zopfli.js.gz | md5sum
11fe0be6e2e0e4d83d4af60fbe8ab598  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
cdnjs 137600 bytes 11fe0be6e2e0e4d83d4af60fbe8ab598 (invalid)
unpkg 136507 bytes 11fe0be6e2e0e4d83d4af60fbe8ab598 (invalid)
jsdelivr 136077 bytes 11fe0be6e2e0e4d83d4af60fbe8ab598 June 4, 2018 @ 08:57

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
130575 bytes -4 bytes zopfli --i1000000 --mls4096 --bsr20 --lazy --ohh June 6, 2018 @ 09:23
130579 bytes -8 bytes zopfli --i100000 --mls4096 --bsr20 --lazy --ohh June 4, 2018 @ 19:05
130587 bytes -1 byte zopfli --i10000 --mls4096 --bsr21 --lazy --ohh June 4, 2018 @ 14:32
130588 bytes -6 bytes zopfli --i10000 --mls2048 --bsr25 --lazy --ohh June 4, 2018 @ 13:15
130594 bytes -4 bytes zopfli --i1000 --mls2048 --bsr25 --lazy --ohh June 4, 2018 @ 09:40
130598 bytes -6 bytes zopfli --i1000 --mls1024 --bsr20 --lazy --ohh June 4, 2018 @ 09:36
130604 bytes -10 bytes zopfli --i1000 --mls4096 --bsr7 --lazy --ohh June 4, 2018 @ 09:36
130614 bytes zopfli --i100 --mls4096 --bsr22 --lazy --ohh June 4, 2018 @ 09:19

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
130746 130746 130916 130896 130775 130685 130830 130787 130773 130835 130850 130842 130659 130669 130655
130845 130842 130820 130816 130782 130901 130805 130785 130808 130816 130884 130804 130876 130880 130881
130828 130818 130820 130816 130738 130807 130742 130877 130827 130796 130862 130791 130682 130879 130797
130823 130789 130807 130795 130817 130875 130849 130865 130802 130794 130688 130596 130836 130846 130892
130809 130803 130794 130801 130793 130798 130840 130829 130837 130713 130839 130594 130839 130712 130801
130660 130653 130809 130799 130668 130796 130884 130874 130794 130796 130791 130781 130835 130829 130803
130664 130806 130810 130792 130839 130780 130850 130807 130963 130795 130836 130832 130686 130796 130790
130669 130800 130808 130807 130848 130791 130831 130857 130794 130651 130590 130787 130669 130596 130820
130830 130662 130819 130823 130801 130806 130819 130814 130793 130846 130855 130595 130846 130846 130767
130820 130652 130818 130762 130853 130816 130876 130886 130791 130792 130580 130609 130592 130608 130778
130828 130653 130823 130818 130837 130824 130848 130840 130844 130702 130860 130832 130828 130836 130764
130819 130668 130808 130822 130856 130845 130871 130876 130817 130661 130658 130663 130821 130597 130778
130821 130677 130818 130841 130826 130851 130851 130868 130845 130704 130851 130659 130833 130702 130781
130826 130822 130821 130825 130849 130840 130847 130866 130845 130665 130675 130661 130667 130797 130777
130805 130822 130818 130823 130816 130816 130851 130850 130821 130688 130851 130659 130868 130868 130598
130805 130802 130663 130838 130837 130835 130825 130853 130850 130650 130658 130654 130840 130846 130763
130804 130795 130807 130679 130814 130821 130850 130854 130842 130590 130837 130575 130842 130604 130761
130808 130791 130833 130675 130677 130651 130840 130844 130842 130658 130602 130580 130844 130596 130758
130833 130808 130820 130817 130843 130828 130681 130853 130819 130849 130853 130590 130862 130598 130761
130820 130820 130822 130818 130821 130824 130837 130848 130872 130662 130591 130597 130840 130696 130777
130822 130651 130658 130649 130655 130798 130799 130875 130802 130664 130581 130592 130865 130595 130795
130659 130805 130816 130673 130834 130821 130828 130855 130840 130842 130848 130665 130873 130596 130796
130663 130760 130660 130667 130838 130820 130852 130847 130849 130795 130796 130794 130833 130802 130763

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 130614 bytes 100%
1,000 130594 bytes -20 bytes 100%
10,000 130587 bytes -7 bytes 100%
100,000 130579 bytes -8 bytes 1.16%
1,000,000 130575 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
130715 bytes +140 bytes (+0.11%)
131310 bytes +735 bytes (+0.56%) +595 bytes
131290 bytes +715 bytes (+0.55%) +575 bytes
131127 bytes +552 bytes (+0.42%) +412 bytes
131034 bytes +459 bytes (+0.35%) +319 bytes
130922 bytes +347 bytes (+0.27%) +207 bytes
130893 bytes +318 bytes (+0.24%) +178 bytes
130782 bytes +207 bytes (+0.16%) +67 bytes
130756 bytes +181 bytes (+0.14%) +41 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 87663 bytes -42912 bytes (-32.86%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 100938 bytes -29637 bytes (-22.70%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 104872 bytes -25703 bytes (-19.68%)
Brotli (Wikipedia) brotli brotli -q 11 110873 bytes -19702 bytes (-15.09%)
LZMA2 (Wikipedia) xz xz -9 111644 bytes -18931 bytes (-14.50%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 116037 bytes -14538 bytes (-11.13%)
Zstandard (Wikipedia) zstd zstd -19 118101 bytes -12474 bytes (-9.55%)

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.