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

After GZIP compression these minified files vary in size:
unpkg
  102290 bytes (99.9k)
CDN
Boot
  89189 bytes (87.1k)
CDN
cdnjs
  89189 bytes (87.1k)
CDN
gzip -6 (default)
  88671 bytes (86.6k)
local copy
gzip -9
  88382 bytes (86.3k)
local copy
libdeflate -12
  84869 bytes (82.9k)
local copy
7zip -mx=9 -tgzip
  84466 bytes (82.5k)
local copy
kzip -s0 -rn -b7
  84359 bytes (82.4k)
local copy
zultra
  84237 bytes (82.3k)
local copy
pigz -11 -n
  84055 bytes (82.1k)
local copy
Zopfli
  83894 bytes (81.9k)
local copy
Zopfli (defluff)
  83892 bytes (81.9k)
local copy

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

You will automatically get the smallest D3 6.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 5295 bytes by using my D3 6.6.0 Zopfli version instead of the best available CDN (6.31% smaller than cdnjs, 83894 vs. 89189 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 --bsr21 --lazy --ohh

(found March 16, 2021)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 8192  --mls8192
block splitting recursion 21  --bsr21
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 (83892 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.6.0/d3.zip --location | md5sum
7f6d9c9033dcf648a089d6b481513a70  -
curl --silent --compressed https://minime.stephan-brumme.com/files/d3/d3-6.6.0.min.zopfli.js.gz | md5sum
7f6d9c9033dcf648a089d6b481513a70  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/mbostock/d3/v6.6.0/d3.zip --location | sha1sum
7e8ac34ea3ebd759b5245889a951e307a4762270  -
curl --silent --compressed https://minime.stephan-brumme.com/files/d3/d3-6.6.0.min.zopfli.js.gz | sha1sum
7e8ac34ea3ebd759b5245889a951e307a4762270  -

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 102290 bytes 7f6d9c9033dcf648a089d6b481513a70 (invalid)
Boot 89189 bytes 7f6d9c9033dcf648a089d6b481513a70 March 10, 2021 @ 23:16
cdnjs 89189 bytes 7f6d9c9033dcf648a089d6b481513a70 March 10, 2021 @ 23:16

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
83894 bytes -4 bytes zopfli --i1000000 --mls8192 --bsr21 --lazy --ohh March 16, 2021 @ 04:26
83898 bytes -9 bytes zopfli --i100000 --mls8192 --bsr21 --lazy --ohh March 15, 2021 @ 13:10
83907 bytes -1 byte zopfli --i10000 --mls8192 --bsr21 --lazy --ohh March 12, 2021 @ 20:37
83908 bytes -8 bytes zopfli --i10000 --mls8192 --bsr11 --lazy --ohh March 12, 2021 @ 19:11
83916 bytes -3 bytes zopfli --i1000 --mls8192 --bsr21 --lazy --ohh March 12, 2021 @ 14:09
83919 bytes -31 bytes zopfli --i1000 --mls8192 --bsr11 --lazy --ohh March 12, 2021 @ 14:08
83950 bytes zopfli --i100 --mls8192 --bsr21 --lazy --ohh March 12, 2021 @ 13:20

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

Most recent activity on March 16, 2021 @ 12:46.

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
84232 84411 84315 84422 84400 84583 84385 84278 84360 84398 84168 84252 84136 84236 84269
84217 84216 84584 84213 84204 84205 84271 84020 84236 84023 84036 83991 84009 84249 84085
84062 84271 84258 84118 84007 84172 84019 84007 84174 83984 84004 84001 83956 83961 83953
84179 84192 84230 84221 83989 84218 84194 84186 84169 83988 84281 84066 83948 83976 83970
84298 84338 84317 84091 84154 84289 84142 84077 84252 83985 84097 83988 83984 83973 83968
84175 84211 84218 84353 83976 83997 83992 84087 84080 83981 83968 83977 83963 83918 84026
84186 84218 84211 84397 83978 84175 84199 84076 84074 83974 83972 83975 83940 83974 84029
84185 84171 84193 84387 83966 84170 83978 83978 84299 83973 83989 83969 83906 84066 84023
84417 84275 84210 84086 84179 84167 84197 84174 84181 83971 83969 84025 83930 84340 84189
84182 84173 84218 84176 83982 84230 84171 84173 84177 83975 83974 83973 83999 84113 84175
84171 84176 84218 84116 83980 84166 84199 83972 84166 83970 84085 84124 83930 84369 84089
84172 84198 84215 84180 84182 84198 84162 84200 84177 84012 84086 83963 83933 84375 84061
84189 84189 84377 84399 84180 84102 84198 84178 84128 83968 83986 84109 84069 84369 84188
84175 84340 84209 84180 84192 84171 84162 84080 84080 83976 83975 84163 84123 84264 84179
84187 84189 84340 84120 84317 84186 84170 84173 84089 83979 83978 84166 84094 84370 84183
84173 84185 84210 84183 84180 84172 83965 84174 84176 83971 83967 84162 84139 84249 84125
84196 84195 84306 84113 84319 84177 84162 84182 84178 83991 83977 84163 84070 84256 84120
84190 84176 84216 84177 84317 84175 84194 84077 84074 83975 83973 83985 83894 84262 84175
84180 84187 84211 84117 84183 84167 84183 84179 84078 83975 83971 84170 83923 84371 84122
84181 84188 84208 84113 84208 84176 84197 84178 84182 83976 84087 84167 84067 84065 84063
84179 84189 84212 84180 84218 84175 83962 84178 84177 83972 83975 84167 84065 84130 84124
84190 84187 84211 84193 84341 84167 84166 84173 84078 83973 84083 84167 84082 84257 84182
84165 84273 84211 84187 84316 84163 84165 84174 84175 84007 83968 84202 84123 84369 84362

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 83950 bytes 100%
1,000 83916 bytes -34 bytes 100%
10,000 83907 bytes -9 bytes 100%
100,000 83898 bytes -9 bytes 0.58%
1,000,000 83894 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
84378 bytes +484 bytes (+0.58%) +19 bytes
85766 bytes +1872 bytes (+2.23%) +1407 bytes
85598 bytes +1704 bytes (+2.03%) +1239 bytes
84384 bytes +490 bytes (+0.58%) +25 bytes
84389 bytes +495 bytes (+0.59%) +30 bytes
84387 bytes +493 bytes (+0.59%) +28 bytes
84389 bytes +495 bytes (+0.59%) +30 bytes
84359 bytes +465 bytes (+0.55%)
84380 bytes +486 bytes (+0.58%) +21 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 65579 bytes -18315 bytes (-21.83%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 73048 bytes -10846 bytes (-12.93%)
LZMA2 (Wikipedia) xz xz -9 74176 bytes -9718 bytes (-11.58%)
Brotli (Wikipedia) brotli brotli -q 11 74303 bytes -9591 bytes (-11.43%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 74916 bytes -8978 bytes (-10.70%)
Zstandard (Wikipedia) zstd zstd -19 80088 bytes -3806 bytes (-4.54%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 82854 bytes -1040 bytes (-1.24%)

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.