Choose a version:
48% The original file has 446364 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 212366 bytes (207.4k, 48%).

After GZIP compression these minified files vary in size:
Boot
  81357 bytes (79.5k)
CDN
cdnjs
  71949 bytes (70.3k)
CDN
cdnhttps
  71694 bytes (70.0k)
CDN
gzip -6 (default)
  71343 bytes (69.7k)
local copy
gzip -9
  71100 bytes (69.4k)
local copy
libdeflate -12
  68372 bytes (66.8k)
local copy
7zip -mx=9 -tgzip
  68013 bytes (66.4k)
local copy
kzip -s0 -rn -b8
  67529 bytes (65.9k)
local copy
pigz -11 -n
  67475 bytes (65.9k)
local copy
Zopfli
  67394 bytes (65.8k)
local copy

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

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

(found September 22, 2016)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 1024  --mls1024
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

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.5/d3.zip --location | md5sum
4bdc0cd68c0bf2cbcf6e70d3bde2122d  -
curl --silent --compressed https://minime.stephan-brumme.com/files/d3/d3-4.2.5.min.zopfli.js.gz | md5sum
4bdc0cd68c0bf2cbcf6e70d3bde2122d  -

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

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 81357 bytes 4bdc0cd68c0bf2cbcf6e70d3bde2122d September 21, 2016 @ 16:50
cdnjs 71949 bytes 4bdc0cd68c0bf2cbcf6e70d3bde2122d September 20, 2016 @ 22:31
cdnhttps 71694 bytes 4bdc0cd68c0bf2cbcf6e70d3bde2122d 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.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
67394 bytes -5 bytes zopfli --i1000000 --mls1024 --bsr8 --lazy --ohh September 22, 2016 @ 08:57
67399 bytes -5 bytes zopfli --i100000 --mls1024 --bsr8 --lazy --ohh September 21, 2016 @ 12:44
67404 bytes -5 bytes zopfli --i10000 --mls1024 --bsr8 --lazy --ohh September 21, 2016 @ 11:37
67409 bytes -18 bytes zopfli --i1000 --mls1024 --bsr8 --lazy --ohh September 21, 2016 @ 11:25
67427 bytes zopfli --i100 --mls1024 --bsr8 --lazy --ohh September 21, 2016 @ 11:10

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
67642 67640 67724 67709 67703 67710 67708 67718 67753 67816 67818 67939 67943 67930 67555
67626 68325 67716 68331 67521 67712 67596 67577 67578 67512 67519 67437 67552 67584 67596
67572 68294 67570 67568 67567 67568 67497 67501 67583 67550 67437 67419 67496 67496 67616
67568 67603 67568 67579 68297 67560 67575 67564 67425 67472 67550 67470 67523 68301 67588
67679 67677 67559 68281 67576 67555 67561 67563 67411 67394 67562 67554 67592 67649 68257
67572 67545 67576 67582 68273 68279 67545 67537 68245 67546 67537 67588 67430 67581 68278
67539 67547 67581 68253 68250 68243 67536 67557 67538 67549 67577 67602 67623 68269 67583
67571 67583 67546 68250 68248 67557 68240 67534 67535 67546 67548 67551 67542 68266 68281
67546 67545 67546 68254 67567 68256 67546 67538 67538 67531 67544 67545 68281 68267 67583
67542 67550 67544 68255 68250 67533 67540 67539 68244 67543 67543 67554 67498 67545 68251
67533 67537 67544 67546 68248 67549 67545 67553 67534 67547 67540 67553 67495 67548 67577
67546 67572 67536 67548 68245 68246 67540 67534 68236 67548 67551 67552 67547 68281 67579
67533 67546 67541 67538 68248 68253 67561 67540 67534 67549 67553 67539 67570 68266 67619
67544 67542 67536 68242 68245 68244 67539 67548 67537 67546 67537 67550 68273 68259 68259
67543 67539 67533 68241 68242 67546 67544 67542 67541 67539 67563 67617 67569 67612 67579
67536 67543 67534 68245 68244 67539 67535 67535 67542 67541 67538 67549 67570 68266 67404
67543 67547 67536 68251 67542 68242 67545 67552 67539 67541 68258 68258 67508 68265 67575
67547 67542 68254 68240 67552 67543 68243 67547 67544 67539 67544 67551 67574 68294 67595
67542 67549 67544 68238 68242 68247 67532 67575 67544 67537 67546 67547 67546 68266 67575
67542 67544 67546 68270 68253 68248 68255 67535 67545 67539 67536 67545 67544 68259 67579
67542 67542 67546 68246 67551 67549 67543 67541 67558 67540 68262 68266 67488 67586 67601
67539 67546 67545 68252 68255 68247 67553 67548 67537 67562 67538 67575 67573 68266 67579
67541 67553 67539 67538 68247 68258 67563 67568 67541 67535 67540 67566 67623 67620 67589

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 67427 bytes 100%
1,000 67409 bytes -18 bytes 100%
10,000 67404 bytes -5 bytes 100%
100,000 67399 bytes -5 bytes 0.58%
1,000,000 67394 bytes -5 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 +157 bytes (+0.23%) +22 bytes
68999 bytes +1605 bytes (+2.38%) +1470 bytes
68870 bytes +1476 bytes (+2.19%) +1341 bytes
68494 bytes +1100 bytes (+1.63%) +965 bytes
67802 bytes +408 bytes (+0.61%) +273 bytes
67698 bytes +304 bytes (+0.45%) +169 bytes
67691 bytes +297 bytes (+0.44%) +162 bytes
67548 bytes +154 bytes (+0.23%) +19 bytes
67529 bytes +135 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.
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 53402 bytes -13992 bytes (-20.76%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 59386 bytes -8008 bytes (-11.88%)
LZMA2 (Wikipedia) xz xz -9 60180 bytes -7214 bytes (-10.70%)
Brotli (Wikipedia) brotli brotli -q 11 60321 bytes -7073 bytes (-10.49%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 61642 bytes -5752 bytes (-8.53%)
Zstandard (Wikipedia) zstd zstd -19 65467 bytes -1927 bytes (-2.86%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 66799 bytes -595 bytes (-0.88%)

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