Choose a version:
47% The original file has 455252 bytes (444.6k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 215854 bytes (210.8k, 47%).

After GZIP compression these minified files vary in size:
Boot
  82947 bytes (81.0k)
CDN
cdnjs
  73354 bytes (71.6k)
CDN
gzip -6 (default)
  72907 bytes (71.2k)
local copy
jsdelivr
  72744 bytes (71.0k)
CDN
gzip -9
  72626 bytes (70.9k)
local copy
libdeflate -12
  69828 bytes (68.2k)
local copy
7zip -mx=9 -tgzip
  69574 bytes (67.9k)
local copy
kzip -s0 -rn -b7
  69244 bytes (67.6k)
local copy
pigz -11 -n
  69083 bytes (67.5k)
local copy
Zopfli
  69009 bytes (67.4k)
local copy
Zopfli (defluff)
  69007 bytes (67.4k)
local copy

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

You will automatically get the smallest D3 4.7.2 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 3735 bytes by using my D3 4.7.2 Zopfli version instead of the best available CDN (5.41% smaller than jsdelivr, 69009 vs. 72744 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 --mls512 --bsr23 --lazy --ohh

(found May 4, 2017)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 512  --mls512
block splitting recursion 23  --bsr23
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 (69007 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/v4.7.2/d3.zip --location | md5sum
e251b5e971ffc8027a83258f503ee762  -
curl --silent --compressed https://minime.stephan-brumme.com/files/d3/d3-4.7.2.min.zopfli.js.gz | md5sum
e251b5e971ffc8027a83258f503ee762  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/mbostock/d3/v4.7.2/d3.zip --location | sha1sum
b5590047ac4ff1ef4a7b23a9ba39d3f96325918f  -
curl --silent --compressed https://minime.stephan-brumme.com/files/d3/d3-4.7.2.min.zopfli.js.gz | sha1sum
b5590047ac4ff1ef4a7b23a9ba39d3f96325918f  -

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 82947 bytes e251b5e971ffc8027a83258f503ee762 March 12, 2017 @ 22:40
cdnjs 73354 bytes e251b5e971ffc8027a83258f503ee762 March 10, 2017 @ 19:48
jsdelivr 72744 bytes e251b5e971ffc8027a83258f503ee762 March 10, 2017 @ 19:34

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
69009 bytes -1 byte zopfli --i1000000 --mls512 --bsr23 --lazy --ohh May 4, 2017 @ 23:51
69010 bytes -4 bytes zopfli --i1000000 --mls512 --bsr11 --lazy --ohh May 4, 2017 @ 03:09
69014 bytes -3 bytes zopfli --i100000 --mls512 --bsr11 --lazy --ohh May 3, 2017 @ 06:59
69017 bytes -2 bytes zopfli --i100000 --mls2 --bsr11 --lazy --ohh May 2, 2017 @ 23:08
69019 bytes -2 bytes zopfli --i10000 --mls2 --bsr11 --lazy --ohh April 29, 2017 @ 19:53
69021 bytes -4 bytes zopfli --i10000 --mls512 --bsr23 --lazy --ohh April 29, 2017 @ 17:13
69025 bytes -3 bytes zopfli --i10000 --mls4 --bsr17 --lazy --ohh April 29, 2017 @ 16:58
69028 bytes -1 byte zopfli --i1000 --mls512 --bsr11 --lazy --ohh April 28, 2017 @ 16:33
69029 bytes -2 bytes zopfli --i1000 --mls4 --bsr15 --lazy --ohh April 28, 2017 @ 15:35
69031 bytes -22 bytes zopfli --i1000 --mls512 --bsr16 --lazy --ohh April 28, 2017 @ 15:33
69053 bytes zopfli --i100 --mls16 --bsr23 --lazy --ohh April 28, 2017 @ 14:59

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

Most recent activity on May 5, 2017 @ 09: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
69291 69485 69405 69415 69421 69375 69282 69271 69289 69295 69277 69264 69245 69230 69285
69293 69276 69082 69082 69119 69082 69112 69096 69069 69203 69190 69191 69174 69193 69192
69029 69112 69083 69030 69050 69032 69189 69196 69087 69188 69162 69053 69170 69195 69190
69064 69023 69027 69029 69034 69167 69200 69428 69166 69165 69174 69180 69185 69186 69204
69053 69048 69051 69030 69284 69025 69235 69153 69159 69179 69178 69185 69200 69181 69181
69028 69030 69038 69032 69030 69031 70111 69168 69027 69159 69150 69202 69213 69121 69181
69024 69027 69046 69036 69152 69231 69191 69160 69146 69156 69170 69157 69173 69167 69194
69017 69024 69033 69028 69028 69026 69194 69176 69010 69170 69164 69177 69174 69171 69174
69084 69065 69033 69034 69160 69169 69199 69160 69016 69167 69170 69178 69184 69199 69203
69031 69031 69042 69032 69206 69158 69205 69202 69144 69162 69164 69182 69180 69170 69178
69075 69028 69033 69025 69152 69204 69171 69164 69159 69163 69165 69195 69175 69173 69177
69031 69022 69040 69027 69034 69172 69202 69166 69150 69162 69167 69192 69193 69184 69173
69098 69099 69031 69023 69206 69167 69175 69174 69009 69160 69163 69181 69178 69166 69170
69065 69025 69033 69026 69201 69184 69195 69170 69030 69130 69163 69034 69186 69203 69173
69022 70116 69154 69143 69196 69177 69202 69170 69150 69130 69170 69189 69154 69168 69173
69026 69025 69030 69023 69201 69176 69169 69170 69152 69129 69139 69150 69145 69167 69172
69025 69025 69193 69142 69151 69169 69199 69170 69154 69129 69140 69181 69142 69174 69176
69025 69025 69029 69033 69160 69206 69200 69172 69144 69131 69137 69154 69155 69165 69171
69074 69033 69030 69025 69205 69174 69193 69170 69145 69133 69139 69158 69186 69167 69176
69071 69024 69031 69025 69034 69035 69202 69171 69009 69129 69165 69183 69142 69199 69173
69078 69028 69035 69027 69027 69031 69202 69172 69039 69131 69165 69029 69141 69166 69139
69085 69037 69033 69024 69203 69159 69203 69170 69165 69126 69143 69156 69141 69203 69138
69067 69026 69036 69028 69198 69204 69156 70095 69032 69135 69130 69144 69146 69177 69191

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 69053 bytes 100%
1,000 69028 bytes -25 bytes 100%
10,000 69019 bytes -9 bytes 100%
100,000 69014 bytes -5 bytes 1.45%
1,000,000 69009 bytes -5 bytes 0.87%
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
69269 bytes +260 bytes (+0.38%) +25 bytes
70582 bytes +1573 bytes (+2.28%) +1338 bytes
70261 bytes +1252 bytes (+1.81%) +1017 bytes
69393 bytes +384 bytes (+0.56%) +149 bytes
69269 bytes +260 bytes (+0.38%) +25 bytes
69286 bytes +277 bytes (+0.40%) +42 bytes
69293 bytes +284 bytes (+0.41%) +49 bytes
69244 bytes +235 bytes (+0.34%)
69256 bytes +247 bytes (+0.36%) +12 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 54278 bytes -14731 bytes (-21.35%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 60337 bytes -8672 bytes (-12.57%)
LZMA2 (Wikipedia) xz xz -9 61200 bytes -7809 bytes (-11.32%)
Brotli (Wikipedia) brotli brotli -q 11 61296 bytes -7713 bytes (-11.18%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 62289 bytes -6720 bytes (-9.74%)
Zstandard (Wikipedia) zstd zstd -19 66709 bytes -2300 bytes (-3.33%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 67763 bytes -1246 bytes (-1.81%)

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