Choose a version:
48% The original file has 509238 bytes (497.3k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 244787 bytes (239.0k, 48%).

After GZIP compression these minified files vary in size:
unpkg
  92255 bytes (90.1k)
CDN
Boot
  80912 bytes (79.0k)
CDN
cdnjs
  80912 bytes (79.0k)
CDN
gzip -6 (default)
  80219 bytes (78.3k)
local copy
gzip -9
  79911 bytes (78.0k)
local copy
libdeflate -12
  76759 bytes (75.0k)
local copy
7zip -mx=9 -tgzip
  76255 bytes (74.5k)
local copy
zultra
  75941 bytes (74.2k)
local copy
kzip -s0 -rn -b8
  75890 bytes (74.1k)
local copy
pigz -11 -n
  75787 bytes (74.0k)
local copy
Zopfli
  75713 bytes (73.9k)
local copy
Zopfli (defluff)
  75711 bytes (73.9k)
local copy

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

You will automatically get the smallest D3 5.10.0 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 5199 bytes by using my D3 5.10.0 Zopfli version instead of the best available CDN (6.87% smaller than cdnjs, 75713 vs. 80912 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 --mls32768 --bsr40 --lazy --ohh

(found September 2, 2019)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 32768  --mls32768
block splitting recursion 40  --bsr40
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 (75711 bytes).

Verify file integrity

After decompression, my uncompressed files are identical to the original ones:

MD5:
curl --silent --compressed https://raw.githubusercontent.com/mbostock/d3/v5.10.0/d3.zip --location | md5sum
dda05bbbcf551e364a3941a655cd7342  -
curl --silent --compressed https://minime.stephan-brumme.com/files/d3/d3-5.10.0.min.zopfli.js.gz | md5sum
dda05bbbcf551e364a3941a655cd7342  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/mbostock/d3/v5.10.0/d3.zip --location | sha1sum
d5d863cd1561759a327dfdbf6cf498f616bc436a  -
curl --silent --compressed https://minime.stephan-brumme.com/files/d3/d3-5.10.0.min.zopfli.js.gz | sha1sum
d5d863cd1561759a327dfdbf6cf498f616bc436a  -

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 92255 bytes dda05bbbcf551e364a3941a655cd7342 (invalid)
Boot 80912 bytes dda05bbbcf551e364a3941a655cd7342 August 19, 2019 @ 20:00
cdnjs 80912 bytes dda05bbbcf551e364a3941a655cd7342 August 19, 2019 @ 20:00

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

Other Versions

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

6.7.0, 6.6.2, 6.6.1, 6.6.0, 6.5.0, 6.4.0, 6.3.1, 6.2.0, 6.1.1, 6.1.0, 6.0.0,
5.16.0, 5.15.1, 5.15.0, 5.14.2, 5.14.1, 5.14.0, 5.13.1, 5.13.0, 5.12.0, 5.11.0, 5.10.1, 5.10.0,
5.9.7, 5.9.6, 5.9.5, 5.9.4, 5.9.3, 5.9.2, 5.9.1, 5.9.0, 5.8.2, 5.8.1, 5.8.0, 5.7.0, 5.6.0, 5.5.0, 5.4.0, 5.3.0, 5.2.0, 5.1.0, 5.0.1, 5.0.0,
4.13.0, 4.12.2, 4.12.1, 4.12.0, 4.11.0, 4.10.2, 4.10.1, 4.10.0,
4.9.1, 4.9.0, 4.8.0, 4.7.4, 4.7.3, 4.7.2, 4.7.1, 4.7.0, 4.6.0, 4.5.0, 4.4.4, 4.4.3, 4.4.2, 4.4.1, 4.4.0, 4.3.0, 4.2.8, 4.2.7, 4.2.6, 4.2.5, 4.2.4, 4.2.3, 4.2.2, 4.2.1, 4.2.0, 4.1.1, 4.1.0, 4.0.0,
3.5.17, 3.5.16, 3.5.15, 3.5.14, 3.5.13, 3.5.12, 3.5.11, 3.5.10, 3.5.9, 3.5.8, 3.5.7, 3.5.6, 3.5.5, 3.5.4, 3.5.3, 3.5.2, 3.5.1, 3.5.0, 3.4.13, 3.4.12, 3.4.11, 3.4.10, 3.4.9, 3.4.8, 3.4.6, 3.4.5, 3.4.4, 3.4.3, 3.4.2, 3.4.1, 3.4.0, 3.3.13, 3.3.12, 3.3.11, 3.3.10, 3.3.9, 3.3.8, 3.3.7, 3.3.6, 3.3.5, 3.3.4, 3.3.3, 3.3.2, 3.3.1, 3.3.0, 3.2.8, 3.2.7, 3.2.6, 3.2.5, 3.2.4, 3.2.3, 3.2.2, 3.2.1, 3.2.0, 3.1.10, 3.1.9, 3.1.8, 3.1.7, 3.1.6, 3.1.5, 3.1.4, 3.1.3, 3.1.2, 3.1.1, 3.1.0, 3.0.8, 3.0.7, 3.0.6, 3.0.5, 3.0.4, 3.0.3, 3.0.2, 3.0.1, 3.0.0

The project site contains an overview how well these versions were compressed.
Other interesting projects are AngularJS, BackboneJS, Bootstrap, Dojo, Ember, jQuery, Knockout, lodash, React, Socket.IO, ThreeJS, UnderscoreJS and Vue.

Changelog

Best Zopfli parameters so far:
Size Improvement Parameters Found
75713 bytes -2 bytes zopfli --i1000000 --mls32768 --bsr40 --lazy --ohh September 2, 2019 @ 22:46
75715 bytes -7 bytes zopfli --i100000 --mls32768 --bsr40 --lazy --ohh August 30, 2019 @ 20:30
75722 bytes -9 bytes zopfli --i10000 --mls32768 --bsr40 --lazy --ohh August 30, 2019 @ 16:53
75731 bytes -23 bytes zopfli --i1000 --mls32768 --bsr40 --lazy --ohh August 30, 2019 @ 02:04
75754 bytes zopfli --i100 --mls32768 --bsr40 --lazy --ohh August 29, 2019 @ 19:24

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
76106 75912 76268 76237 76189 76189 76185 76231 76216 76075 75957 76132 75986 75954 76217
76295 76296 75992 76194 76182 75983 75981 75990 76216 76223 75826 76050 75831 75999 75928
75968 76019 76028 75983 75986 75772 75774 75802 75968 75778 75808 75774 75952 75948 75751
76056 76023 76048 75964 76097 76011 75764 75778 75870 75990 75767 75959 75998 75864 75974
76106 75980 76090 76074 75835 75843 75846 75842 76091 75949 75856 75875 75847 75879 75921
75957 75951 76003 75959 75975 75775 75767 75869 76058 76067 75754 75751 75915 75930 75977
75947 75773 75805 75759 75988 75784 75764 75778 75988 75751 75782 75760 75913 75921 75919
75958 76104 75970 76084 75979 75786 75754 75832 75993 75943 75869 75751 75887 75931 75943
75950 75761 75975 75971 75771 75779 75769 75776 76051 75950 75760 75753 75914 75961 75922
75980 75952 75964 75958 75978 75782 75765 75863 76056 75947 75757 75770 75889 75942 75948
76062 76017 75975 75976 75982 75774 75758 75780 76056 75959 75849 75754 75917 75948 75962
75778 75784 75970 75763 76101 75771 75773 75775 75963 75982 75803 75756 75914 75913 75920
75946 75779 75805 75764 75972 75782 75758 75868 76062 75946 75757 75755 75919 75924 75914
75955 76101 75976 75966 75977 75780 75767 75776 75971 75949 75761 75752 75856 75931 75915
75957 75966 75966 75972 75977 75779 75754 75865 76054 75948 75756 75743 75916 75933 75939
75956 75989 75974 75960 75972 75784 75765 75777 76064 75949 75757 75752 75916 76035 75920
75966 75988 75967 75961 75970 75777 75765 75780 76057 75956 75758 75746 75914 75934 75911
75943 75993 75965 75767 75977 75777 75766 75777 76053 75943 75757 75756 75773 75959 76073
76062 75972 75965 75977 75985 75777 75770 75781 76064 75958 75769 75754 75918 75917 75921
75751 75983 75970 75972 75980 75781 75755 75779 76064 75948 75758 75756 75914 75941 76067
75965 75992 75967 75983 75980 75781 75768 75778 75991 75943 75757 75759 75921 75904 75921
76059 75967 76074 75982 75980 75785 75763 75781 76060 75953 75757 75752 75911 75931 75922
75955 75959 75966 75967 75977 75773 75762 75778 75973 75976 75776 75754 75777 75962 75713

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 75754 bytes 100%
1,000 75731 bytes -23 bytes 100%
10,000 75722 bytes -9 bytes 100%
100,000 75715 bytes -7 bytes 1.16%
1,000,000 75713 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
76180 bytes +467 bytes (+0.62%) +290 bytes
77555 bytes +1842 bytes (+2.43%) +1665 bytes
77447 bytes +1734 bytes (+2.29%) +1557 bytes
76182 bytes +469 bytes (+0.62%) +292 bytes
76176 bytes +463 bytes (+0.61%) +286 bytes
76159 bytes +446 bytes (+0.59%) +269 bytes
76136 bytes +423 bytes (+0.56%) +246 bytes
75947 bytes +234 bytes (+0.31%) +57 bytes
75890 bytes +177 bytes (+0.23%)

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 59591 bytes -16122 bytes (-21.29%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 66343 bytes -9370 bytes (-12.38%)
LZMA2 (Wikipedia) xz xz -9 67256 bytes -8457 bytes (-11.17%)
Brotli (Wikipedia) brotli brotli -q 11 67403 bytes -8310 bytes (-10.98%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 69377 bytes -6336 bytes (-8.37%)
Zstandard (Wikipedia) zstd zstd -19 72674 bytes -3039 bytes (-4.01%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 75327 bytes -386 bytes (-0.51%)

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.