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

After GZIP compression these minified files vary in size:
Boot
  61041 bytes (59.6k)
CDN, direct link
jsdelivr
  61041 bytes (59.6k)
CDN, direct link
cdnjs
  53904 bytes (52.6k)
CDN, direct link
unpkg
  53629 bytes (52.4k)
CDN, direct link
gzip -6 (default)
  53507 bytes (52.3k)
local copy
cdnhttps
  53497 bytes (52.2k)
CDN, direct link
gzip -9
  53370 bytes (52.1k)
local copy
libdeflate -12
  51667 bytes (50.5k)
local copy
7zip -mx=9 -tgzip
  51609 bytes (50.4k)
local copy
pigz -11 -n
  51365 bytes (50.2k)
local copy
kzip -s0 -rn -b8
  51326 bytes (50.1k)
local copy
Zopfli
  51271 bytes (50.1k)
local copy
Zopfli (defluff)
  51270 bytes (50.1k)
local copy

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

You will automatically get the smallest D3 3.5.10 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 2226 bytes by using my D3 3.5.10 Zopfli version instead of the best available CDN (4.34% smaller than cdnhttps, 51271 vs. 53497 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 --mls32768 --bsr21 --lazy --ohh

(found December 1, 2015)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 32768  --mls32768
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 1 more byte (51270 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.5.10/d3.min.js --location | md5sum
229dbdb2bd670288db77d55b1e7fe9f7  -
curl --silent --compressed http://minime.stephan-brumme.com/files/d3/d3-3.5.10.min.zopfli.js.gz | md5sum
229dbdb2bd670288db77d55b1e7fe9f7  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/mbostock/d3/v3.5.10/d3.min.js --location | sha1sum
88a7515ed7bd194fad57a7a9291c438aeb65fb3b  -
curl --silent --compressed http://minime.stephan-brumme.com/files/d3/d3-3.5.10.min.zopfli.js.gz | sha1sum
88a7515ed7bd194fad57a7a9291c438aeb65fb3b  -

All listed CDNs deliver identical contents:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 61041 bytes 229dbdb2bd670288db77d55b1e7fe9f7 December 1, 2015 @ 19:53
jsdelivr 61041 bytes 229dbdb2bd670288db77d55b1e7fe9f7 (invalid)
cdnjs 53904 bytes 229dbdb2bd670288db77d55b1e7fe9f7 (invalid)
unpkg 53629 bytes 229dbdb2bd670288db77d55b1e7fe9f7 July 11, 2016 @ 16:30
cdnhttps 53497 bytes 229dbdb2bd670288db77d55b1e7fe9f7 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.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
51271 bytes -2 bytes zopfli --i1000000 --mls32768 --bsr21 --lazy --ohh December 1, 2015 @ 01:53
51273 bytes -5 bytes zopfli --i100000 --mls32768 --bsr21 --lazy --ohh November 30, 2015 @ 15:32
51278 bytes -9 bytes zopfli --i10000 --mls32768 --bsr21 --lazy --ohh November 30, 2015 @ 14:23
51287 bytes -8 bytes zopfli --i1000 --mls32768 --bsr21 --lazy --ohh November 30, 2015 @ 14:17
51295 bytes zopfli --i100 --mls32768 --bsr21 --lazy --ohh November 30, 2015 @ 13:59

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

Most recent activity on July 11, 2016 @ 16:30.

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
51430 51386 51429 51457 51457 51419 51452 51424 51443 51440 51529 51533 51408 51430 51553
51337 51307 51319 51326 51343 51386 51390 51407 51407 51397 51405 51427 51401 51398 51308
51361 51365 51336 51368 51362 51349 51352 51399 51389 51397 51383 51396 51384 51412 51311
51391 51334 51339 51383 51445 51308 51307 51399 51386 51394 51398 51408 51391 51387 51317
51353 51423 51334 51468 51421 51346 51357 51405 51398 51395 51535 51405 51540 51382 51544
51325 51462 51370 51375 51349 51342 51331 51401 51390 51395 51383 51412 51392 51381 51277
51381 51360 51372 51380 51368 51464 51363 51404 51383 51397 51533 51422 51390 51405 51309
51437 51423 51429 51371 51448 51449 51328 51406 51387 51392 51398 51398 51398 51385 51311
51324 51319 51349 51375 51464 51367 51460 51411 51386 51319 51401 51396 51386 51380 51328
51375 51355 51349 51368 51357 51340 51386 51406 51401 51397 51399 51411 51392 51389 51312
51370 51426 51459 51364 51359 51439 51351 51402 51390 51389 51397 51397 51392 51399 51305
51379 51424 51325 51382 51342 51371 51362 51399 51406 51388 51374 51392 51386 51381 51352
51409 51360 51349 51382 51390 51437 51353 51406 51386 51402 51383 51405 51386 51399 51311
51358 51370 51377 51360 51462 51357 51459 51410 51391 51387 51382 51407 51386 51384 51307
51378 51331 51335 51385 51394 51463 51353 51418 51389 51390 51398 51413 51387 51401 51352
51375 51440 51435 51372 51388 51430 51346 51409 51409 51391 51383 51406 51386 51398 51315
51378 51422 51341 51361 51430 51369 51466 51409 51396 51388 51383 51399 51388 51382 51327
51376 51334 51340 51374 51396 51372 51385 51407 51389 51394 51400 51409 51386 51380 51271
51321 51333 51349 51385 51322 51438 51354 51396 51407 51397 51381 51412 51386 51381 51306
51331 51426 51302 51366 51463 51330 51356 51407 51405 51332 51401 51409 51382 51382 51311
51315 51335 51364 51384 51462 51341 51349 51402 51405 51393 51378 51403 51389 51381 51327
51355 51363 51364 51370 51356 51373 51349 51407 51402 51398 51399 51407 51381 51386 51329
51462 51427 51431 51376 51352 51437 51350 51410 51388 51397 51384 51396 51389 51398 51305

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 51295 bytes 100%
1,000 51287 bytes -8 bytes 100%
10,000 51278 bytes -9 bytes 100%
100,000 51273 bytes -5 bytes 0.58%
1,000,000 51271 bytes -2 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
51576 bytes +305 bytes (+0.59%) +250 bytes
51577 bytes +306 bytes (+0.60%) +251 bytes
51577 bytes +306 bytes (+0.60%) +251 bytes
51516 bytes +245 bytes (+0.48%) +190 bytes
51458 bytes +187 bytes (+0.36%) +132 bytes
51460 bytes +189 bytes (+0.37%) +134 bytes
51351 bytes +80 bytes (+0.16%) +25 bytes
51370 bytes +99 bytes (+0.19%) +44 bytes
51326 bytes +55 bytes (+0.11%)

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 40896 bytes -10375 bytes (-20.24%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 43509 bytes -7762 bytes (-15.14%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 44564 bytes -6707 bytes (-13.08%)
Brotli (Wikipedia) brotli brotli -q 11 46315 bytes -4956 bytes (-9.67%)
LZMA2 (Wikipedia) xz xz -9 47020 bytes -4251 bytes (-8.29%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 48979 bytes -2292 bytes (-4.47%)
ZSTD (Wikipedia) zstd zstd -19 49568 bytes -1703 bytes (-3.32%)

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