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

After GZIP compression these minified files vary in size:
cdnjs
  78601 bytes (76.8k)
CDN
gzip -6 (default)
  77865 bytes (76.0k)
local copy
gzip -9
  77577 bytes (75.8k)
local copy
libdeflate -12
  74344 bytes (72.6k)
local copy
7zip -mx=9 -tgzip
  73865 bytes (72.1k)
local copy
kzip -s0 -rn -b7
  73638 bytes (71.9k)
local copy
pigz -11 -n
  73504 bytes (71.8k)
local copy
Zopfli
  73440 bytes (71.7k)
local copy
Zopfli (defluff)
  73438 bytes (71.7k)
local copy

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

You will automatically get the smallest D3 5.6.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 5161 bytes by using my D3 5.6.0 Zopfli version instead of the best available CDN (7.03% smaller than cdnjs, 73440 vs. 78601 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 --bsr15 --lazy --ohh

(found August 23, 2018)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 4096  --mls4096
block splitting recursion 15  --bsr15
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 (73438 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.6.0/d3.zip --location | md5sum
aef81c1b96b7a5d1ff9be9919de56c0b  -
curl --silent --compressed https://minime.stephan-brumme.com/files/d3/d3-5.6.0.min.zopfli.js.gz | md5sum
aef81c1b96b7a5d1ff9be9919de56c0b  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
cdnjs 78601 bytes aef81c1b96b7a5d1ff9be9919de56c0b August 20, 2018 @ 23:30

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
73440 bytes -1 byte zopfli --i1000000 --mls4096 --bsr15 --lazy --ohh August 23, 2018 @ 23:59
73441 bytes -3 bytes zopfli --i1000000 --mls4096 --bsr19 --lazy --ohh August 23, 2018 @ 23:10
73444 bytes -8 bytes zopfli --i100000 --mls4096 --bsr19 --lazy --ohh August 23, 2018 @ 01:34
73452 bytes -1 byte zopfli --i10000 --mls4096 --bsr19 --lazy --ohh August 22, 2018 @ 15:53
73453 bytes -8 bytes zopfli --i10000 --mls4096 --bsr15 --lazy --ohh August 22, 2018 @ 15:43
73461 bytes -19 bytes zopfli --i1000 --mls4096 --bsr19 --lazy --ohh August 22, 2018 @ 15:32
73480 bytes zopfli --i100 --mls4096 --bsr15 --lazy --ohh August 22, 2018 @ 15:28

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

Most recent activity on August 24, 2018 @ 10: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, 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
73569 73560 73794 73804 73745 73859 73739 73778 73805 73858 73847 73848 73833 73728 73667
73735 73688 73573 73579 73584 73729 73739 73757 73609 73610 73533 73508 73671 73764 73535
73470 73472 73707 73701 73516 73499 73509 73684 73524 73544 73550 73477 73508 73465 73713
73716 73795 73813 73666 73694 73674 73481 73480 73789 73679 73684 73459 73470 73644 73702
73682 73692 73734 73557 73469 73466 73673 73672 73576 73598 73852 73459 73648 73607 73534
73711 73470 73472 73481 73485 73666 73658 73684 73500 73503 73477 73457 73637 73680 73637
73517 73508 73688 73563 73561 73664 73480 73464 73798 73498 73533 73458 73636 73588 73482
73679 73688 73710 73475 73706 73494 73683 73674 73709 73488 73481 73456 73636 73497 73507
73687 73478 73473 73472 73479 73658 73484 73665 73689 73496 73475 73458 73490 73498 73692
73652 73652 73658 73474 73484 73669 73465 73693 73501 73498 73476 73442 73510 73565 73488
73779 73674 73736 73738 73664 73669 73670 73747 73680 73492 73474 73446 73615 73623 73600
73781 73655 73657 73656 73666 73669 73482 73509 73664 73505 73461 73440 73642 73587 73603
73683 73475 73475 73477 73481 73657 73480 73676 73461 73494 73479 73455 73610 73592 73480
73678 73484 73471 73467 73477 73666 73479 73664 73463 73500 73473 73461 73635 73498 73630
73683 73472 73481 73480 73484 73669 73459 73670 73682 73501 73474 73457 73639 73503 73477
73780 73660 73757 73473 73483 73664 73547 73676 73676 73500 73542 73441 73637 73671 73480
73778 73664 73765 73471 73675 73662 73673 73658 73768 73499 73476 73446 73638 73621 73634
73782 73767 73661 73662 73664 73667 73665 73675 73760 73499 73554 73456 73611 73593 73510
73687 73653 73766 73667 73776 73656 73672 73667 73777 73500 73476 73460 73641 73686 73638
73783 73653 73655 73474 73684 73661 73479 73666 73786 73500 73468 73455 73616 73687 73484
73782 73662 73476 73474 73484 73665 73476 73669 73687 73498 73485 73457 73636 73643 73478
73774 73662 73660 73664 73670 73667 73672 73669 73783 73500 73479 73460 73639 73682 73481
73781 73660 73477 73474 73478 73665 73486 73662 73687 73502 73475 73440 73609 73674 73602

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 73480 bytes 100%
1,000 73461 bytes -19 bytes 100%
10,000 73452 bytes -9 bytes 100%
100,000 73444 bytes -8 bytes 1.74%
1,000,000 73440 bytes -4 bytes 1.16%
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
73848 bytes +408 bytes (+0.56%) +210 bytes
75217 bytes +1777 bytes (+2.42%) +1579 bytes
75090 bytes +1650 bytes (+2.25%) +1452 bytes
73852 bytes +412 bytes (+0.56%) +214 bytes
73859 bytes +419 bytes (+0.57%) +221 bytes
73845 bytes +405 bytes (+0.55%) +207 bytes
73815 bytes +375 bytes (+0.51%) +177 bytes
73638 bytes +198 bytes (+0.27%)
73640 bytes +200 bytes (+0.27%) +2 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 58032 bytes -15408 bytes (-20.98%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 64579 bytes -8861 bytes (-12.07%)
LZMA2 (Wikipedia) xz xz -9 65336 bytes -8104 bytes (-11.03%)
Brotli (Wikipedia) brotli brotli -q 11 65641 bytes -7799 bytes (-10.62%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 67193 bytes -6247 bytes (-8.51%)
Zstandard (Wikipedia) zstd zstd -19 70711 bytes -2729 bytes (-3.72%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 73324 bytes -116 bytes (-0.16%)

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