Choose a version:
45% The original file has 326522 bytes (318.9k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 146751 bytes (143.3k, 45%).

After GZIP compression these minified files vary in size:
Boot
  58758 bytes (57.4k)
CDN, direct link
jsdelivr
  58758 bytes (57.4k)
CDN, direct link
cdnjs
  51824 bytes (50.6k)
CDN, direct link
unpkg
  51540 bytes (50.3k)
CDN, direct link
gzip -6 (default)
  51452 bytes (50.2k)
local copy
cdnhttps
  51433 bytes (50.2k)
CDN, direct link
gzip -9
  51291 bytes (50.1k)
local copy
libdeflate -12
  49600 bytes (48.4k)
local copy
7zip -mx=9 -tgzip
  49545 bytes (48.4k)
local copy
pigz -11 -n
  49351 bytes (48.2k)
local copy
kzip -s0 -rn -b8
  49311 bytes (48.2k)
local copy
Zopfli
  49249 bytes (48.1k)
local copy
Zopfli (defluff)
  49248 bytes (48.1k)
local copy

perma-link to the smallest file on my server:
http://minime.stephan-brumme.com/files/d3/d3-3.4.11.min.js

You will automatically get the smallest D3 3.4.11 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 2184 bytes by using my D3 3.4.11 Zopfli version instead of the best available CDN (4.43% smaller than cdnhttps, 49249 vs. 51433 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 --i100000 --mb8 --mls2 --bsr7 --lazy --ohh

(found December 22, 2015)
Description Value Parameter
iterations 100000  --i100000
maximum blocks 8  --mb8
maximum length score 2  --mls2
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 1 more byte (49248 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/v3.4.11/d3.min.js --location | md5sum
bda6b289e4ae055a12d6905eeed9775c  -
curl --silent --compressed http://minime.stephan-brumme.com/files/d3/d3-3.4.11.min.zopfli.js.gz | md5sum
bda6b289e4ae055a12d6905eeed9775c  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/mbostock/d3/v3.4.11/d3.min.js --location | sha1sum
a76de8cc33d3485cddd3455c4d3012a44cd6be4a  -
curl --silent --compressed http://minime.stephan-brumme.com/files/d3/d3-3.4.11.min.zopfli.js.gz | sha1sum
a76de8cc33d3485cddd3455c4d3012a44cd6be4a  -

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 58758 bytes bda6b289e4ae055a12d6905eeed9775c (invalid)
jsdelivr 58758 bytes bda6b289e4ae055a12d6905eeed9775c (invalid)
cdnjs 51824 bytes bda6b289e4ae055a12d6905eeed9775c (invalid)
unpkg 51540 bytes bda6b289e4ae055a12d6905eeed9775c July 11, 2016 @ 16:31
cdnhttps 51433 bytes bda6b289e4ae055a12d6905eeed9775c December 24, 2015 @ 07:33

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

Other Versions

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

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
49249 bytes -5 bytes zopfli --i100000 --mls2 --bsr7 --lazy --ohh December 22, 2015 @ 16:21
49254 bytes -10 bytes zopfli --i10000 --mls2 --bsr7 --lazy --ohh October 13, 2015 @ 18:57
49264 bytes -11 bytes zopfli --i1000 --mls2 --bsr7 --lazy --ohh September 22, 2015 @ 18:04
49275 bytes -3 bytes zopfli --i1000 --mls512 --bsr19 --lazy --ohh September 21, 2015 @ 16:44
49278 bytes -10 bytes zopfli --i1000 --mls8 --bsr12 --lazy --ohh September 19, 2015 @ 05:46
49288 bytes zopfli --i100 --mls8 --bsr12 --lazy --ohh September 18, 2015 @ 20:29

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

Most recent activity on February 24, 2017 @ 00:18.

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 or 100,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
49419 49459 49425 49458 49466 49466 49390 49435 49441 49424 49505 49519 49519 49389 49521
49299 49327 49310 49304 49329 49292 49288 49298 49356 49371 49377 49388 49505 49384 49511
49314 49302 49286 49315 49329 49287 49374 49355 49279 49357 49373 49374 49505 49374 49508
49249 49298 49332 49327 49344 49276 49294 49290 49303 49352 49391 49363 49504 49369 49348
49308 49321 49302 49320 49285 49347 49332 49308 49292 49362 49377 49372 49505 49369 49375
49296 49428 49295 49324 49333 49346 49334 49373 49278 49366 49357 49522 49503 49366 49360
49312 49276 49301 49315 49290 49316 49359 49271 49289 49361 49377 49363 49504 49371 49390
49322 49320 49342 49331 49296 49345 49353 49290 49279 49361 49373 49354 49504 49375 49308
49300 49282 49273 49312 49290 49361 49329 49281 49278 49368 49351 49364 49503 49353 49370
49318 49297 49299 49341 49287 49306 49327 49275 49288 49365 49352 49361 49504 49366 49357
49296 49285 49293 49291 49297 49328 49333 49286 49274 49353 49358 49377 49509 49380 49294
49311 49297 49299 49323 49313 49270 49331 49267 49285 49353 49356 49362 49502 49370 49352
49288 49298 49298 49320 49391 49322 49286 49263 49299 49354 49355 49356 49503 49377 49363
49297 49297 49294 49322 49298 49336 49293 49271 49277 49353 49359 49370 49504 49352 49291
49405 49404 49280 49308 49402 49347 49285 49283 49307 49359 49349 49374 49505 49370 49371
49287 49404 49298 49317 49290 49342 49356 49273 49268 49364 49350 49365 49504 49350 49368
49283 49340 49312 49320 49289 49306 49326 49288 49289 49364 49351 49363 49504 49379 49300
49406 49400 49295 49301 49328 49279 49327 49270 49288 49361 49354 49369 49504 49366 49301
49270 49331 49289 49317 49405 49281 49295 49274 49297 49352 49359 49381 49502 49368 49300
49283 49401 49317 49308 49403 49269 49331 49281 49291 49369 49352 49362 49503 49369 49363
49298 49326 49309 49320 49403 49341 49332 49278 49287 49362 49356 49365 49504 49368 49365
49300 49303 49315 49319 49284 49357 49336 49284 49277 49354 49356 49367 49505 49353 49359
49300 49298 49327 49309 49337 49349 49290 49362 49299 49363 49373 49368 49504 49357 49347

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 49288 bytes 100%
1,000 49264 bytes -24 bytes 100%
10,000 49254 bytes -10 bytes 100%
100,000 49249 bytes -5 bytes 0.29%
1,000,000
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
49543 bytes +294 bytes (+0.60%) +232 bytes
49543 bytes +294 bytes (+0.60%) +232 bytes
49529 bytes +280 bytes (+0.57%) +218 bytes
49473 bytes +224 bytes (+0.45%) +162 bytes
49419 bytes +170 bytes (+0.35%) +108 bytes
49421 bytes +172 bytes (+0.35%) +110 bytes
49327 bytes +78 bytes (+0.16%) +16 bytes
49343 bytes +94 bytes (+0.19%) +32 bytes
49311 bytes +62 bytes (+0.13%)

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 39298 bytes -9951 bytes (-20.21%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 41711 bytes -7538 bytes (-15.31%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 42616 bytes -6633 bytes (-13.47%)
Brotli (Wikipedia) brotli brotli -q 11 44483 bytes -4766 bytes (-9.68%)
LZMA2 (Wikipedia) xz xz -9 45208 bytes -4041 bytes (-8.21%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 46992 bytes -2257 bytes (-4.58%)
ZSTD (Wikipedia) zstd zstd -19 47592 bytes -1657 bytes (-3.36%)

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