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

After GZIP compression these minified files vary in size:
unpkg
  101599 bytes (99.2k)
CDN
Boot
  88575 bytes (86.5k)
CDN
cdnjs
  88575 bytes (86.5k)
CDN
gzip -6 (default)
  87998 bytes (85.9k)
local copy
gzip -9
  87720 bytes (85.7k)
local copy
libdeflate -12
  84222 bytes (82.2k)
local copy
7zip -mx=9 -tgzip
  83823 bytes (81.9k)
local copy
kzip -s0 -rn -b6
  83708 bytes (81.7k)
local copy
zultra
  83467 bytes (81.5k)
local copy
pigz -11 -n
  83406 bytes (81.5k)
local copy
Zopfli
  83248 bytes (81.3k)
local copy
Zopfli (defluff)
  83246 bytes (81.3k)
local copy

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

You will automatically get the smallest D3 6.3.1 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 5327 bytes by using my D3 6.3.1 Zopfli version instead of the best available CDN (6.40% smaller than cdnjs, 83248 vs. 88575 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 --mls8192 --bsr7 --lazy --ohh

(found February 11, 2021)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 8192  --mls8192
block splitting recursion 7  --bsr7
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 (83246 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/v6.3.1/d3.zip --location | md5sum
e375452c15687087979d6222d5e7910c  -
curl --silent --compressed https://minime.stephan-brumme.com/files/d3/d3-6.3.1.min.zopfli.js.gz | md5sum
e375452c15687087979d6222d5e7910c  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/mbostock/d3/v6.3.1/d3.zip --location | sha1sum
257e2f27558e553f4f06ad47b1e975cbab2a4f8d  -
curl --silent --compressed https://minime.stephan-brumme.com/files/d3/d3-6.3.1.min.zopfli.js.gz | sha1sum
257e2f27558e553f4f06ad47b1e975cbab2a4f8d  -

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 101599 bytes e375452c15687087979d6222d5e7910c (invalid)
Boot 88575 bytes e375452c15687087979d6222d5e7910c December 9, 2020 @ 02:18
cdnjs 88575 bytes e375452c15687087979d6222d5e7910c December 9, 2020 @ 02:18

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

Other Versions

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

6.7.0, 6.6.2, 6.6.1, 6.6.0, 6.5.0, 6.4.0, 6.3.1, 6.2.0, 6.1.1, 6.1.0, 6.0.0,
5.16.0, 5.15.1, 5.15.0, 5.14.2, 5.14.1, 5.14.0, 5.13.1, 5.13.0, 5.12.0, 5.11.0, 5.10.1, 5.10.0,
5.9.7, 5.9.6, 5.9.5, 5.9.4, 5.9.3, 5.9.2, 5.9.1, 5.9.0, 5.8.2, 5.8.1, 5.8.0, 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
83248 bytes -4 bytes zopfli --i1000000 --mls8192 --bsr7 --lazy --ohh February 11, 2021 @ 03:49
83252 bytes -7 bytes zopfli --i100000 --mls8192 --bsr7 --lazy --ohh February 10, 2021 @ 17:22
83259 bytes -8 bytes zopfli --i10000 --mls8192 --bsr7 --lazy --ohh February 9, 2021 @ 12:04
83267 bytes -7 bytes zopfli --i1000 --mls8192 --bsr7 --lazy --ohh February 8, 2021 @ 22:43
83274 bytes -5 bytes zopfli --i1000 --mls32768 --bsr11 --lazy --ohh February 8, 2021 @ 22:12
83279 bytes -10 bytes zopfli --i1000 --mls8192 --bsr20 --lazy --ohh February 8, 2021 @ 21:22
83289 bytes -8 bytes zopfli --i1000 --mls8192 --bsr16 --lazy --ohh February 8, 2021 @ 19:55
83297 bytes zopfli --i100 --mls32768 --bsr11 --lazy --ohh February 8, 2021 @ 19:48

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

Most recent activity on February 11, 2021 @ 12:47.

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
83832 83676 83658 83656 83625 83627 83903 83626 83663 83687 83564 83584 83533 83574 83648
84001 83846 83561 83571 83573 83572 83580 83585 83572 83598 83394 83565 83317 83599 83551
83587 83594 83525 83531 83527 83555 83561 83520 83534 83344 83318 83330 83304 83320 83311
83551 83593 83730 83878 83536 83740 83469 83329 83528 83441 83371 83397 83248 83481 83334
83567 83563 83537 83667 83511 83534 83548 83513 83523 83505 83304 83320 83286 83323 83476
83631 83666 83694 83678 83327 83524 83491 83512 83535 83438 83349 83319 83529 83483 83338
83660 83653 83656 83667 83459 83505 83636 83607 83419 83424 83327 83324 83291 83404 83489
83559 83547 83674 83505 83510 83538 83544 83332 83523 83439 83339 83335 83451 83339 83256
83734 83590 83662 83674 83474 83525 83541 83534 83524 83461 83444 83348 83330 83483 83488
83538 83542 83676 83528 83538 83518 83511 83533 83524 83453 83318 83327 83333 83419 83532
83659 83657 83654 83519 83527 83523 83502 83532 83521 83559 83323 83319 83284 83418 83567
83547 83646 83833 83464 83531 83841 83674 83534 83532 83423 83352 83472 83283 83422 83482
83654 83641 83652 83530 83498 83512 83560 83511 83523 83533 83324 83668 83279 83417 83426
83546 83658 83651 83670 83640 83687 83534 83532 83525 83426 83368 83531 83446 83422 83417
83644 83646 83660 83677 83642 83540 83523 83511 83529 83427 83321 83518 83299 83441 83329
83537 83543 83490 83647 83635 83640 83537 83506 83522 83547 83319 83520 83483 83418 83471
83636 83645 83650 83641 83640 83537 83537 83546 83533 83521 83330 83459 83269 83419 83417
83539 83542 83543 83640 83637 83536 83539 83541 83426 83432 83323 83313 83318 83485 83412
83640 83661 83666 83522 83644 83525 83520 83532 83428 83428 83323 83338 83421 83483 83478
83544 83544 83677 83665 83639 83536 83538 83539 83524 83443 83326 83525 83663 83417 83617
83548 83544 83661 83670 83640 83547 83536 83539 83526 83524 83322 83473 83483 83495 83718
83640 83528 83670 83667 83641 83534 83513 83540 83521 83505 83473 83475 83550 83709 83534
83644 83539 83673 83668 83640 83648 83566 83537 83518 83504 83536 83493 83480 83710 83422

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 83297 bytes 100%
1,000 83267 bytes -30 bytes 100%
10,000 83259 bytes -8 bytes 100%
100,000 83252 bytes -7 bytes 0.58%
1,000,000 83248 bytes -4 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
83710 bytes +462 bytes (+0.55%) +2 bytes
85127 bytes +1879 bytes (+2.26%) +1419 bytes
84966 bytes +1718 bytes (+2.06%) +1258 bytes
83752 bytes +504 bytes (+0.61%) +44 bytes
83752 bytes +504 bytes (+0.61%) +44 bytes
83723 bytes +475 bytes (+0.57%) +15 bytes
83708 bytes +460 bytes (+0.55%)
83728 bytes +480 bytes (+0.58%) +20 bytes
83757 bytes +509 bytes (+0.61%) +49 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 - for example, your browser actually supports it !
Algorithm Program Parameters Size Compared To Best Zopfli
ZPAQ (Wikipedia) zpaq zpaq -method 69 65204 bytes -18044 bytes (-21.67%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 72497 bytes -10751 bytes (-12.91%)
LZMA2 (Wikipedia) xz xz -9 73696 bytes -9552 bytes (-11.47%)
Brotli (Wikipedia) brotli brotli -q 11 73834 bytes -9414 bytes (-11.31%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 74282 bytes -8966 bytes (-10.77%)
Zstandard (Wikipedia) zstd zstd -19 79501 bytes -3747 bytes (-4.50%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 82278 bytes -970 bytes (-1.17%)

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

All trademarks are property of their respective owners. You know, the boring legal stuff.