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

After GZIP compression these minified files vary in size:
Boot
  81365 bytes (79.5k)
CDN
cdnjs
  71956 bytes (70.3k)
CDN
cdnhttps
  71700 bytes (70.0k)
CDN
gzip -6 (default)
  71347 bytes (69.7k)
local copy
gzip -9
  71106 bytes (69.4k)
local copy
libdeflate -12
  68444 bytes (66.8k)
local copy
7zip -mx=9 -tgzip
  67955 bytes (66.4k)
local copy
kzip -s0 -rn -b8
  67537 bytes (66.0k)
local copy
pigz -11 -n
  67474 bytes (65.9k)
local copy
Zopfli
  67403 bytes (65.8k)
local copy
Zopfli (defluff)
  67402 bytes (65.8k)
local copy

perma-link to the smallest file on my server:
http://minime.stephan-brumme.com/files/d3/d3-4.2.6.min.js

You will automatically get the smallest D3 4.2.6 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 4297 bytes by using my D3 4.2.6 Zopfli version instead of the best available CDN (6.38% smaller than cdnhttps, 67403 vs. 71700 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 --bsr8 --lazy --ohh

(found September 24, 2016)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 512  --mls512
block splitting recursion 8  --bsr8
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 1 more byte (67402 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.2.6/d3.zip --location | md5sum
a8d4667973aca44596df48c617bca8a7  -
curl --silent --compressed http://minime.stephan-brumme.com/files/d3/d3-4.2.6.min.zopfli.js.gz | md5sum
a8d4667973aca44596df48c617bca8a7  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/mbostock/d3/v4.2.6/d3.zip --location | sha1sum
25d845cbee289f6dfaf1e1b108e13e8792a30c86  -
curl --silent --compressed http://minime.stephan-brumme.com/files/d3/d3-4.2.6.min.zopfli.js.gz | sha1sum
25d845cbee289f6dfaf1e1b108e13e8792a30c86  -

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 81365 bytes a8d4667973aca44596df48c617bca8a7 September 25, 2016 @ 19:23
cdnjs 71956 bytes a8d4667973aca44596df48c617bca8a7 September 22, 2016 @ 20:02
cdnhttps 71700 bytes a8d4667973aca44596df48c617bca8a7 November 22, 2016 @ 16:32

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

Other Versions

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

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
67403 bytes -3 bytes zopfli --i1000000 --mls512 --bsr8 --lazy --ohh September 24, 2016 @ 04:06
67406 bytes -5 bytes zopfli --i100000 --mls512 --bsr8 --lazy --ohh September 23, 2016 @ 16:59
67411 bytes -5 bytes zopfli --i10000 --mls512 --bsr8 --lazy --ohh September 23, 2016 @ 15:43
67416 bytes -23 bytes zopfli --i1000 --mls512 --bsr8 --lazy --ohh September 23, 2016 @ 15:18
67439 bytes zopfli --i100 --mls512 --bsr8 --lazy --ohh September 23, 2016 @ 15:13

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

Most recent activity on November 22, 2016 @ 16:32.

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
67649 67647 67722 67714 67711 67714 67706 67720 67756 67807 67822 67942 67951 67939 67562
67525 68331 68335 67534 67747 67646 67608 67600 67476 67528 67481 67436 67563 67590 67607
68300 68304 68315 68290 67573 67574 67501 67509 67509 67544 67437 67557 67503 67516 67622
67585 68298 67581 68306 68295 68294 67580 67575 67424 67479 67551 67489 67524 68303 67797
67678 67672 68280 68281 68286 67564 67571 67567 67403 67541 67570 67563 67614 67652 67596
67575 67556 67610 68286 68292 67568 68272 67536 67535 67549 67557 67601 67579 67580 68261
67537 67537 67590 68255 67560 68250 67539 67555 67544 67561 67584 67602 67626 67581 67592
67577 67588 67555 68255 67559 67556 67544 67548 67538 67554 67552 67558 67556 68271 68271
67545 67541 68253 67544 68263 67553 67543 67536 67550 67549 68273 67548 68288 67558 67576
67544 67557 68252 68271 68255 67541 67546 67534 68248 67539 67552 67555 67501 68273 68283
67547 67545 67551 68261 68252 68263 67552 67547 67539 67555 67551 67558 67499 67553 67598
67552 67582 68249 68252 68246 67556 67547 67557 67540 67549 67551 67566 67546 68283 67636
67542 67546 67555 68246 68248 67546 67565 67556 67562 67553 67562 67554 67578 67551 67625
67560 67545 68250 68245 68251 67552 67553 67546 67541 67541 67545 67562 67564 68269 68267
67531 67551 67540 68245 68247 67547 67552 67556 67544 67542 67576 67612 67579 67621 67584
67543 67549 67550 68254 68253 67552 67550 67541 67543 67550 67541 67557 67515 67553 68258
67542 67552 67541 68254 68247 67547 67557 67558 67539 67543 67566 68253 67515 67571 67589
67556 67550 67545 68249 67552 67543 67552 67550 67548 67540 67557 67557 67581 67613 67586
67540 67557 67551 68244 68256 67558 67539 67577 67543 67544 67552 67550 67560 67569 67586
67550 67552 67554 68278 68253 68251 67552 67551 68253 67541 67545 67560 67561 68273 67599
67550 67547 68255 68256 68286 68252 67548 67545 67544 67549 67562 67562 67505 67601 67589
67547 67553 68273 68254 68259 67556 67560 67548 67547 67571 67551 67582 67584 67594 67600
67548 67553 67586 68252 68253 67578 67571 67548 67545 67543 67537 67575 67636 67628 67598

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 67439 bytes 100%
1,000 67416 bytes -23 bytes 100%
10,000 67411 bytes -5 bytes 100%
100,000 67406 bytes -5 bytes 1.16%
1,000,000 67403 bytes -3 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
67551 bytes +148 bytes (+0.22%) +14 bytes
69014 bytes +1611 bytes (+2.39%) +1477 bytes
68877 bytes +1474 bytes (+2.19%) +1340 bytes
68500 bytes +1097 bytes (+1.63%) +963 bytes
67809 bytes +406 bytes (+0.60%) +272 bytes
67700 bytes +297 bytes (+0.44%) +163 bytes
67698 bytes +295 bytes (+0.44%) +161 bytes
67554 bytes +151 bytes (+0.22%) +17 bytes
67537 bytes +134 bytes (+0.20%)

Non-DEFLATE Algorithms

Archivers based on completely different compression algorithms often produce superior results.
Unfortunately, browsers only support gzip compression at the moment.
Algorithm Program Parameters Size Compared To Best Zopfli
ZPAQ (Wikipedia) zpaq zpaq -method 69 53403 bytes -14000 bytes (-20.77%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 59376 bytes -8027 bytes (-11.91%)
LZMA2 (Wikipedia) xz xz -9 60188 bytes -7215 bytes (-10.70%)
Brotli (Wikipedia) brotli brotli -q 11 60293 bytes -7110 bytes (-10.55%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 61650 bytes -5753 bytes (-8.54%)
ZSTD (Wikipedia) zstd zstd -19 65477 bytes -1926 bytes (-2.86%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 66801 bytes -602 bytes (-0.89%)

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