Choose a version:
46% The original file has 314783 bytes (307.4k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 144406 bytes (141.0k, 46%).

After GZIP compression these minified files vary in size:
Boot
  57165 bytes (55.8k)
CDN, direct link
jsdelivr
  57165 bytes (55.8k)
CDN, direct link
Baidu
  50122 bytes (48.9k)
CDN, direct link
cdnjs
  50111 bytes (48.9k)
CDN, direct link
unpkg
  49721 bytes (48.6k)
CDN, direct link
gzip -6 (default)
  49713 bytes (48.5k)
local copy
cdnhttps
  49705 bytes (48.5k)
CDN, direct link
gzip -9
  49540 bytes (48.4k)
local copy
libdeflate -12
  47985 bytes (46.9k)
local copy
7zip -mx=9 -tgzip
  47926 bytes (46.8k)
local copy
kzip -s0 -rn -b5
  47689 bytes (46.6k)
local copy
pigz -11 -n
  47671 bytes (46.6k)
local copy
Zopfli
  47590 bytes (46.5k)
local copy
Zopfli (defluff)
  47587 bytes (46.5k)
local copy

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

You will automatically get the smallest D3 3.3.2 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 2115 bytes by using my D3 3.3.2 Zopfli version instead of the best available CDN (4.44% smaller than cdnhttps, 47590 vs. 49705 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 --mls4096 --bsr22 --lazy --ohh

(found December 21, 2015)
Description Value Parameter
iterations 100000  --i100000
maximum blocks 8  --mb8
maximum length score 4096  --mls4096
block splitting recursion 22  --bsr22
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 3 more bytes (47587 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.3.2/d3.min.js --location | md5sum
fe953709ba2ba6a3dfdffd6dfb55ab33  -
curl --silent --compressed http://minime.stephan-brumme.com/files/d3/d3-3.3.2.min.zopfli.js.gz | md5sum
fe953709ba2ba6a3dfdffd6dfb55ab33  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/mbostock/d3/v3.3.2/d3.min.js --location | sha1sum
0a08899b03e6bdbc645561175fb3a9d9279c5de8  -
curl --silent --compressed http://minime.stephan-brumme.com/files/d3/d3-3.3.2.min.zopfli.js.gz | sha1sum
0a08899b03e6bdbc645561175fb3a9d9279c5de8  -

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 57165 bytes fe953709ba2ba6a3dfdffd6dfb55ab33 (invalid)
jsdelivr 57165 bytes fe953709ba2ba6a3dfdffd6dfb55ab33 (invalid)
cdnjs 50111 bytes fe953709ba2ba6a3dfdffd6dfb55ab33 (invalid)
unpkg 49721 bytes fe953709ba2ba6a3dfdffd6dfb55ab33 July 11, 2016 @ 16:31
cdnhttps 49705 bytes fe953709ba2ba6a3dfdffd6dfb55ab33 December 24, 2015 @ 07:33

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
Baidu 50122 bytes 1b8be1a9f4d070ffa0c0e430952a4741 only whitespaces differ (invalid)

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

Other Versions

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

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
47590 bytes -2 bytes zopfli --i100000 --mls4096 --bsr22 --lazy --ohh December 21, 2015 @ 17:33
47592 bytes -7 bytes zopfli --i10000 --mls4096 --bsr22 --lazy --ohh October 21, 2015 @ 13:50
47599 bytes -9 bytes zopfli --i1000 --mls4096 --bsr22 --lazy --ohh September 21, 2015 @ 23:54
47608 bytes -1 byte zopfli --i1000 --mls4096 --bsr11 --lazy --ohh September 19, 2015 @ 23:37
47609 bytes -4 bytes zopfli --i1000 --mls1024 --bsr14 --lazy --ohh September 19, 2015 @ 23:26
47613 bytes -8 bytes zopfli --i1000 --mls512 --bsr18 --lazy --ohh September 19, 2015 @ 23:23
47621 bytes zopfli --i100 --mls1024 --bsr15 --lazy --ohh September 18, 2015 @ 20:02

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

Most recent activity on February 27, 2017 @ 06:19.

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
47734 47735 47728 47732 47727 47709 47731 47731 47726 47736 47741 47850 47864 47767 47865
47710 47666 47699 47736 47651 47628 47655 47752 47690 47642 47638 47633 47860 47666 47867
47637 47630 47685 47673 47645 47617 47684 47739 47657 47622 47628 47627 47844 47622 47865
47619 47632 47620 47637 47625 47622 47638 47622 47629 47857 47622 47622 47845 47631 47853
47629 47646 47721 47637 47627 47628 47694 47681 47637 47722 47732 47632 47841 47721 47853
47648 47641 47683 47672 47624 47647 47694 47644 47643 47637 47623 47623 47849 47729 47868
47619 47645 47617 47619 47624 47623 47674 47687 47639 47619 47622 47780 47861 47605 47843
47625 47619 47618 47619 47622 47629 47674 47728 47662 47624 47639 47602 47847 47777 47853
47643 47655 47640 47636 47676 47676 47680 47719 47640 47618 47620 47628 47865 47627 47854
47619 47643 47657 47670 47621 47668 47677 47717 47620 47619 47637 47629 47860 47630 47879
47646 47621 47689 47675 47685 47617 47698 47717 47613 47604 47618 47628 47863 47630 47867
47624 47631 47683 47643 47644 47667 47637 47622 47633 47602 47624 47623 47845 47626 47845
47618 47646 47659 47671 47670 47670 47678 47684 47606 47619 47622 47627 47845 47621 47875
47623 47640 47685 47656 47622 47621 47706 47688 47628 47626 47626 47630 47849 47626 47875
47626 47624 47638 47629 47624 47624 47680 47720 47609 47628 47624 47625 47846 47625 47869
47643 47667 47625 47668 47621 47636 47682 47698 47608 47623 47636 47625 47848 47625 47848
47627 47670 47639 47656 47623 47683 47676 47685 47621 47621 47636 47623 47846 47724 47850
47604 47643 47621 47661 47630 47627 47678 47628 47620 47631 47622 47775 47846 47632 47848
47622 47626 47643 47657 47624 47670 47694 47686 47621 47631 47621 47590 47847 47602 47875
47665 47624 47681 47668 47625 47640 47687 47715 47655 47645 47643 47628 47847 47601 47875
47615 47619 47656 47669 47621 47656 47680 47724 47615 47631 47623 47628 47846 47625 47717
47641 47652 47661 47661 47623 47617 47684 47691 47658 47625 47641 47622 47865 47612 47849
47644 47620 47656 47669 47626 47672 47682 47693 47610 47626 47625 47631 47846 47629 47858

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 47614 bytes 100%
1,000 47599 bytes -15 bytes 100%
10,000 47592 bytes -7 bytes 100%
100,000 47590 bytes -2 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
47893 bytes +303 bytes (+0.64%) +204 bytes
47891 bytes +301 bytes (+0.63%) +202 bytes
47899 bytes +309 bytes (+0.65%) +210 bytes
47816 bytes +226 bytes (+0.47%) +127 bytes
47823 bytes +233 bytes (+0.49%) +134 bytes
47689 bytes +99 bytes (+0.21%)
47712 bytes +122 bytes (+0.26%) +23 bytes
47700 bytes +110 bytes (+0.23%) +11 bytes
47707 bytes +117 bytes (+0.25%) +18 bytes

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 38177 bytes -9413 bytes (-19.78%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 40376 bytes -7214 bytes (-15.16%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 41069 bytes -6521 bytes (-13.70%)
Brotli (Wikipedia) brotli brotli -q 11 43068 bytes -4522 bytes (-9.50%)
LZMA2 (Wikipedia) xz xz -9 43780 bytes -3810 bytes (-8.01%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 45618 bytes -1972 bytes (-4.14%)
ZSTD (Wikipedia) zstd zstd -19 46073 bytes -1517 bytes (-3.19%)

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