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

After GZIP compression these minified files vary in size:
Boot
  81347 bytes (79.4k)
CDN, direct link
cdnjs
  71944 bytes (70.3k)
CDN, direct link
cdnhttps
  71687 bytes (70.0k)
CDN, direct link
gzip -6 (default)
  71337 bytes (69.7k)
local copy
gzip -9
  71093 bytes (69.4k)
local copy
libdeflate -12
  68366 bytes (66.8k)
local copy
7zip -mx=9 -tgzip
  68009 bytes (66.4k)
local copy
kzip -s0 -rn -b8
  67516 bytes (65.9k)
local copy
pigz -11 -n
  67464 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.4.min.js

You will automatically get the smallest D3 4.2.4 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 4284 bytes by using my D3 4.2.4 Zopfli version instead of the best available CDN (6.36% smaller than cdnhttps, 67403 vs. 71687 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 --bsr6 --lazy --ohh

(found September 22, 2016)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 4096  --mls4096
block splitting recursion 6  --bsr6
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.4/d3.zip --location | md5sum
3468a45c3a628154362677a4f68b17f7  -
curl --silent --compressed http://minime.stephan-brumme.com/files/d3/d3-4.2.4.min.zopfli.js.gz | md5sum
3468a45c3a628154362677a4f68b17f7  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/mbostock/d3/v4.2.4/d3.zip --location | sha1sum
66ec475de66b1bd187d72f36127d2471136fe3ad  -
curl --silent --compressed http://minime.stephan-brumme.com/files/d3/d3-4.2.4.min.zopfli.js.gz | sha1sum
66ec475de66b1bd187d72f36127d2471136fe3ad  -

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 81347 bytes 3468a45c3a628154362677a4f68b17f7 September 21, 2016 @ 16:50
cdnjs 71944 bytes 3468a45c3a628154362677a4f68b17f7 September 19, 2016 @ 21:17
cdnhttps 71687 bytes 3468a45c3a628154362677a4f68b17f7 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:

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 --mls4096 --bsr6 --lazy --ohh September 22, 2016 @ 08:59
67406 bytes -4 bytes zopfli --i100000 --mls4096 --bsr6 --lazy --ohh September 20, 2016 @ 11:10
67410 bytes -8 bytes zopfli --i10000 --mls4096 --bsr6 --lazy --ohh September 20, 2016 @ 09:50
67418 bytes -26 bytes zopfli --i1000 --mls4096 --bsr6 --lazy --ohh September 20, 2016 @ 09:42
67444 bytes zopfli --i100 --mls4096 --bsr6 --lazy --ohh September 20, 2016 @ 00:40

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
67636 67633 67717 67757 67700 67699 67704 67706 67744 67792 67810 67931 67937 67925 67823
68271 68321 68330 68324 67594 67702 67709 67427 67571 67485 67503 67427 67685 67639 67591
67569 67567 67566 67564 67566 67561 67484 67569 67577 67667 67432 67403 67480 67489 67606
67568 67563 67572 67559 67561 67552 67562 67560 67571 67471 67539 67460 67508 68288 67608
67673 67664 67552 68272 68279 67558 67559 67555 67547 67534 67553 67545 67584 67627 68254
67528 67539 67538 68271 68269 68272 67540 67530 67537 67545 67534 67581 67618 68285 68271
67531 67543 67576 68238 68249 68237 67532 67540 67530 67556 67533 67595 67540 68260 67577
67535 67541 67528 68272 68237 67547 67531 67528 68233 67541 67540 67541 67536 68286 68278
67529 67538 67531 68246 67533 68250 67532 67530 67544 67535 67537 67538 68262 68258 67576
67539 67545 67541 67549 68250 67527 67539 67533 67540 67537 67535 67548 67564 68259 68249
67526 67536 67537 67544 68250 67537 67540 67544 67529 67527 67534 67546 67483 68258 67591
67540 67569 67541 68255 68242 68237 67527 67532 68234 67541 67539 67542 67566 68264 67577
67525 67542 67535 67539 68244 67534 67553 68240 67538 67541 67541 67532 67564 68242 67592
67533 67535 67530 67538 68242 68235 67532 67541 68236 67539 67533 67538 68266 68262 68245
67533 67523 67529 68251 68234 67533 67539 67544 68234 67526 67560 67590 67564 67607 67604
67528 67536 67529 67537 68237 68237 67537 67528 68234 67537 67533 67541 67544 68262 68277
67531 67539 67527 68244 67539 68237 67540 67528 67535 67528 68246 67535 67502 68253 67601
67540 67551 67534 68232 68272 67541 68237 67534 67535 67532 67538 67541 67548 68286 67586
67535 67543 67535 67535 68241 68236 67540 67544 67536 67536 67533 67539 67562 68277 67593
67529 67536 67538 68263 68237 68238 68249 67545 67534 67531 67530 67540 67543 68278 67571
67536 67535 67539 67540 67571 68235 67536 67535 67534 67534 68257 68257 67484 67577 67589
67531 67537 67538 68246 68248 68243 68238 67543 67531 67557 67534 67566 67589 68258 67598
67537 67540 67532 67560 68241 68248 67557 67558 67538 67531 67525 67561 67611 67612 67585

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 67444 bytes 100%
1,000 67418 bytes -26 bytes 100%
10,000 67410 bytes -8 bytes 100%
100,000 67406 bytes -4 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
67542 bytes +139 bytes (+0.21%) +26 bytes
68996 bytes +1593 bytes (+2.36%) +1480 bytes
68860 bytes +1457 bytes (+2.16%) +1344 bytes
68492 bytes +1089 bytes (+1.62%) +976 bytes
67799 bytes +396 bytes (+0.59%) +283 bytes
67693 bytes +290 bytes (+0.43%) +177 bytes
67686 bytes +283 bytes (+0.42%) +170 bytes
67543 bytes +140 bytes (+0.21%) +27 bytes
67516 bytes +113 bytes (+0.17%)

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 53401 bytes -14002 bytes (-20.77%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 59379 bytes -8024 bytes (-11.90%)
LZMA2 (Wikipedia) xz xz -9 60164 bytes -7239 bytes (-10.74%)
Brotli (Wikipedia) brotli brotli -q 11 60246 bytes -7157 bytes (-10.62%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 61633 bytes -5770 bytes (-8.56%)
ZSTD (Wikipedia) zstd zstd -19 65459 bytes -1944 bytes (-2.88%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 66755 bytes -648 bytes (-0.96%)

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 2017.
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