Choose a version:
45% The original file has 334221 bytes (326.4k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 150180 bytes (146.7k, 45%).

After GZIP compression these minified files vary in size:
Boot
  60571 bytes (59.2k)
CDN
jsdelivr
  60571 bytes (59.2k)
CDN
cdnjs
  53504 bytes (52.3k)
CDN
unpkg
  53215 bytes (52.0k)
CDN
gzip -6 (default)
  53079 bytes (51.8k)
local copy
cdnhttps
  53074 bytes (51.8k)
CDN
gzip -9
  52937 bytes (51.7k)
local copy
libdeflate -12
  51240 bytes (50.0k)
local copy
7zip -mx=9 -tgzip
  51218 bytes (50.0k)
local copy
pigz -11 -n
  51181 bytes (50.0k)
local copy
kzip -s0 -rn -b7
  50904 bytes (49.7k)
local copy
Zopfli
  50867 bytes (49.7k)
local copy
Zopfli (defluff)
  50864 bytes (49.7k)
local copy

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

You will automatically get the smallest D3 3.5.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 2207 bytes by using my D3 3.5.0 Zopfli version instead of the best available CDN (4.34% smaller than cdnhttps, 50867 vs. 53074 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 --i100000 --mb8 --mls512 --bsr11 --lazy --ohh

(found December 22, 2015)
Description Value Parameter
iterations 100000  --i100000
maximum blocks 8  --mb8
maximum length score 512  --mls512
block splitting recursion 11  --bsr11
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 (50864 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/v3.5.0/d3.min.js --location | md5sum
3d6c4827498590dfab637c05c078f4cc  -
curl --silent --compressed https://minime.stephan-brumme.com/files/d3/d3-3.5.0.min.zopfli.js.gz | md5sum
3d6c4827498590dfab637c05c078f4cc  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/mbostock/d3/v3.5.0/d3.min.js --location | sha1sum
d9629ac161ac74889fab9252d1c32eb7f8b055ef  -
curl --silent --compressed https://minime.stephan-brumme.com/files/d3/d3-3.5.0.min.zopfli.js.gz | sha1sum
d9629ac161ac74889fab9252d1c32eb7f8b055ef  -

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 60571 bytes 3d6c4827498590dfab637c05c078f4cc (invalid)
jsdelivr 60571 bytes 3d6c4827498590dfab637c05c078f4cc (invalid)
cdnjs 53504 bytes 3d6c4827498590dfab637c05c078f4cc (invalid)
unpkg 53215 bytes 3d6c4827498590dfab637c05c078f4cc July 11, 2016 @ 16:31
cdnhttps 53074 bytes 3d6c4827498590dfab637c05c078f4cc December 24, 2015 @ 07:33

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

Other Versions

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

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
50867 bytes -3 bytes zopfli --i100000 --mls512 --bsr11 --lazy --ohh December 22, 2015 @ 16:24
50870 bytes -7 bytes zopfli --i10000 --mls512 --bsr11 --lazy --ohh November 23, 2015 @ 17:59
50877 bytes -1 byte zopfli --i10000 --mls16384 --bsr20 --lazy --ohh October 13, 2015 @ 21:21
50878 bytes -13 bytes zopfli --i1000 --mls512 --bsr11 --lazy --ohh September 19, 2015 @ 04:02
50891 bytes -7 bytes zopfli --i1000 --mls16 --bsr14 --lazy --ohh September 19, 2015 @ 03:39
50898 bytes zopfli --i100 --mls16384 --bsr12 --lazy --ohh September 18, 2015 @ 20:57

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

Most recent activity on February 21, 2017 @ 18:15.

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 or 100,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
51058 51023 51082 51042 50974 50979 50983 51013 50996 51127 51025 51013 51137 51128 51136
50985 50979 50931 50909 50977 50918 50916 50978 50895 50914 50941 50993 51132 50882 50902
50974 50972 50965 50949 50975 50915 50905 50910 50891 50895 50927 50990 51128 50913 50908
50979 50926 50893 50923 51002 50948 50914 50912 50897 50896 50915 51002 51128 50904 50909
51000 50924 50914 50923 50980 50920 50951 50940 50890 50999 50939 51003 51128 50905 50913
50992 50936 50899 50928 50984 50918 50984 50905 50897 50972 50899 50997 51128 50913 50953
50975 50920 50917 50915 50979 50905 50908 50912 50894 50896 51134 51002 51129 50904 50909
51063 50943 50938 50952 50980 50918 50902 50920 50867 50971 50984 50978 51131 50961 50907
51057 50939 50928 50927 50979 50924 50980 50914 50899 50911 51128 50985 51128 50881 50910
50992 50921 50920 50930 50972 50987 50950 50967 50899 50905 50907 50981 51129 50905 50903
51058 50945 50917 50881 50950 50918 50974 50968 50899 50901 50900 50982 51128 50906 50911
50991 50930 50928 50947 50983 50921 50911 50897 50898 50896 50901 50972 51129 50902 50952
51000 50947 50926 50948 50974 50924 50981 50912 50895 50908 50905 50995 51129 50903 50914
51008 50945 50932 50922 50978 50921 50974 50903 50900 50897 50908 50994 51128 50903 50910
50978 50964 50944 50924 50972 50923 50901 50913 50906 50970 50905 50995 51123 50878 50910
51001 50941 50952 50881 50973 50919 50906 50913 50896 50903 50903 50982 51129 50878 50950
50996 50944 50919 50927 50975 50920 50980 50912 50904 50904 50904 51007 51128 50877 50931
50991 50922 50919 50953 50973 50909 50972 50986 50899 50973 50903 50996 51128 50903 50959
50997 50926 50920 50946 50970 50901 50980 50911 50905 50970 50898 50975 51129 50904 50905
50972 50920 50891 50950 50971 50924 50979 50909 50905 50973 50867 50994 51128 50877 50947
50990 50920 50921 50927 50975 50910 50980 50986 50903 50903 50896 50974 51129 50881 50912
50999 50944 50942 50947 50974 50920 50978 50989 50909 50906 50903 50996 51128 50907 50910
50974 50964 50934 50929 50977 50925 50979 50911 50897 50899 50904 51004 51125 50892 50966

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 50894 bytes 100%
1,000 50878 bytes -16 bytes 100%
10,000 50870 bytes -8 bytes 100%
100,000 50867 bytes -3 bytes 0.58%
1,000,000
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
51170 bytes +303 bytes (+0.60%) +266 bytes
51169 bytes +302 bytes (+0.59%) +265 bytes
51174 bytes +307 bytes (+0.60%) +270 bytes
51108 bytes +241 bytes (+0.47%) +204 bytes
51051 bytes +184 bytes (+0.36%) +147 bytes
51055 bytes +188 bytes (+0.37%) +151 bytes
50957 bytes +90 bytes (+0.18%) +53 bytes
50904 bytes +37 bytes (+0.07%)
50929 bytes +62 bytes (+0.12%) +25 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 40571 bytes -10296 bytes (-20.24%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 43169 bytes -7698 bytes (-15.13%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 44222 bytes -6645 bytes (-13.06%)
Brotli (Wikipedia) brotli brotli -q 11 45921 bytes -4946 bytes (-9.72%)
LZMA2 (Wikipedia) xz xz -9 46668 bytes -4199 bytes (-8.25%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 48528 bytes -2339 bytes (-4.60%)
Zstandard (Wikipedia) zstd zstd -19 49155 bytes -1712 bytes (-3.37%)

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