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

After GZIP compression these minified files vary in size:
cdnjs
  138786 bytes (135.5k)
CDN
unpkg
  137668 bytes (134.4k)
CDN
gzip -6 (default)
  137345 bytes (134.1k)
local copy
jsdelivr
  137247 bytes (134.0k)
CDN
gzip -9
  136883 bytes (133.7k)
local copy
libdeflate -12
  132298 bytes (129.2k)
local copy
7zip -mx=9 -tgzip
  132221 bytes (129.1k)
local copy
zultra
  132043 bytes (128.9k)
local copy
kzip -s0 -rn -b8
  131886 bytes (128.8k)
local copy
pigz -11 -n
  131840 bytes (128.8k)
local copy
Zopfli
  131722 bytes (128.6k)
local copy
Zopfli (defluff)
  131717 bytes (128.6k)
local copy

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

You will automatically get the smallest ThreeJS 95 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 5525 bytes by using my ThreeJS 95 Zopfli version instead of the best available CDN (4.19% smaller than jsdelivr, 131722 vs. 137247 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 --bsr19 --lazy --ohh

(found August 5, 2018)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 4096  --mls4096
block splitting recursion 19  --bsr19
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 5 more bytes (131717 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/r95/build/three.min.js --location | md5sum
c692f22af631cc6caffc843babda40dc  -
curl --silent --compressed https://minime.stephan-brumme.com/files/threejs/three-r95.min.zopfli.js.gz | md5sum
c692f22af631cc6caffc843babda40dc  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
cdnjs 138786 bytes c692f22af631cc6caffc843babda40dc (invalid)
unpkg 137668 bytes c692f22af631cc6caffc843babda40dc (invalid)
jsdelivr 137247 bytes c692f22af631cc6caffc843babda40dc August 10, 2018 @ 10:03

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
131722 bytes -2 bytes zopfli --i1000000 --mls4096 --bsr19 --lazy --ohh August 5, 2018 @ 15:45
131724 bytes -1 byte zopfli --i100000 --mls4096 --bsr19 --lazy --ohh August 4, 2018 @ 17:11
131725 bytes -4 bytes zopfli --i100000 --mls2048 --bsr17 --lazy --ohh August 4, 2018 @ 17:10
131729 bytes -8 bytes zopfli --i10000 --mls4096 --bsr19 --lazy --ohh August 3, 2018 @ 21:18
131737 bytes -4 bytes zopfli --i1000 --mls4096 --bsr19 --lazy --ohh August 3, 2018 @ 15:18
131741 bytes -15 bytes zopfli --i1000 --mls2048 --bsr17 --lazy --ohh August 3, 2018 @ 15:09
131756 bytes zopfli --i100 --mls2048 --bsr21 --lazy --ohh August 3, 2018 @ 14:52

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
131836 131842 131974 132035 131970 132018 131834 131858 131859 131964 131833 131825 131766 131782 131904
132013 132025 132019 132011 132010 132004 132002 131830 132000 131942 132004 131935 131833 131832 131994
131968 131976 131997 131957 132024 131993 131882 132091 131978 131830 131928 131803 131816 131828 132014
131928 131947 131955 131810 131950 131945 131976 131981 131968 131825 131977 131979 131815 131980 131760
131808 131795 131966 131785 131971 131798 131976 131972 131829 131826 131975 131772 131814 131997 131948
131787 131780 131974 131799 131964 131803 131978 131965 131999 131828 131971 131919 131815 131974 131769
131991 131776 131984 131946 131967 131800 131945 131987 131959 131961 131975 131770 131790 131961 131746
131967 131969 131979 131948 131965 131949 132003 131976 131949 131787 131739 131756 131960 131994 131993
131964 131951 131963 131955 131926 131921 131948 131917 131952 131820 131993 131778 131817 131997 131952
131976 131966 131988 131948 131996 131904 131976 131974 131958 131763 131754 131756 131970 131819 131962
131964 131998 131973 131959 131993 131902 131962 131971 131804 132007 131975 131796 131958 131831 131949
131960 131962 131811 131953 131950 131927 131972 132019 131808 131811 131767 131764 131978 132003 131750
131956 131952 131953 131946 131946 131916 131963 131913 131954 132003 131992 131968 131955 132011 131832
131791 131792 131794 131789 131798 131908 131978 131992 131983 131994 131725 131741 131819 131998 131949
131795 131794 131792 131785 131793 131967 131980 132004 131964 131823 131778 131992 131998 131998 131746
131794 131799 131778 131785 131797 131945 131968 131808 131998 131820 131970 131722 131816 131977 131948
131965 131966 131979 131782 131969 131968 131964 131992 131780 131764 131955 131735 131727 132001 131792
131808 131801 131971 131949 131967 131972 131964 132001 131973 131826 131736 131738 131954 132001 131808
131784 131946 131802 131950 131949 131922 131956 131956 131970 131820 131974 131764 131827 131995 131949
131961 131947 131958 131946 131951 131957 131976 131992 131949 131923 131759 131761 131958 131999 131755
131796 131954 131953 131942 131949 131952 131970 131960 131919 132004 131759 131994 132072 131817 131946
131805 131789 131802 131794 131797 131973 131975 132000 131972 131926 131729 131778 131818 131833 131835
131794 131782 131802 131791 131798 131904 131981 131991 131808 131830 131954 131917 131820 131996 131752

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 131756 bytes 100%
1,000 131737 bytes -19 bytes 100%
10,000 131729 bytes -8 bytes 100%
100,000 131724 bytes -5 bytes 1.16%
1,000,000 131722 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
131957 bytes +235 bytes (+0.18%) +71 bytes
132480 bytes +758 bytes (+0.58%) +594 bytes
132466 bytes +744 bytes (+0.56%) +580 bytes
132295 bytes +573 bytes (+0.44%) +409 bytes
132230 bytes +508 bytes (+0.39%) +344 bytes
132110 bytes +388 bytes (+0.29%) +224 bytes
131914 bytes +192 bytes (+0.15%) +28 bytes
131916 bytes +194 bytes (+0.15%) +30 bytes
131886 bytes +164 bytes (+0.12%)

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 88525 bytes -43197 bytes (-32.79%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 101978 bytes -29744 bytes (-22.58%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 105773 bytes -25949 bytes (-19.70%)
Brotli (Wikipedia) brotli brotli -q 11 111947 bytes -19775 bytes (-15.01%)
LZMA2 (Wikipedia) xz xz -9 112640 bytes -19082 bytes (-14.49%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 117426 bytes -14296 bytes (-10.85%)
Zstandard (Wikipedia) zstd zstd -19 118554 bytes -13168 bytes (-10.00%)

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.