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

After GZIP compression these minified files vary in size:
Boot
  58576 bytes (57.2k)
CDN
jsdelivr
  58576 bytes (57.2k)
CDN
Baidu
  51647 bytes (50.4k)
CDN
cdnjs
  51635 bytes (50.4k)
CDN
unpkg
  51330 bytes (50.1k)
CDN
gzip -6 (default)
  51249 bytes (50.0k)
local copy
cdnhttps
  51238 bytes (50.0k)
CDN
gzip -9
  51077 bytes (49.9k)
local copy
libdeflate -12
  49435 bytes (48.3k)
local copy
7zip -mx=9 -tgzip
  49327 bytes (48.2k)
local copy
pigz -11 -n
  49121 bytes (48.0k)
local copy
kzip -s0 -rn -b8
  49090 bytes (47.9k)
local copy
Zopfli
  49043 bytes (47.9k)
local copy
Zopfli (defluff)
  49042 bytes (47.9k)
local copy

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

You will automatically get the smallest D3 3.4.3 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 2195 bytes by using my D3 3.4.3 Zopfli version instead of the best available CDN (4.48% smaller than cdnhttps, 49043 vs. 51238 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 --mls128 --bsr18 --lazy --ohh

(found December 22, 2015)
Description Value Parameter
iterations 100000  --i100000
maximum blocks 8  --mb8
maximum length score 128  --mls128
block splitting recursion 18  --bsr18
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 (49042 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.3/d3.min.js --location | md5sum
1dbed1c40d10c8f04f17ae0d8489a97c  -
curl --silent --compressed http://minime.stephan-brumme.com/files/d3/d3-3.4.3.min.zopfli.js.gz | md5sum
1dbed1c40d10c8f04f17ae0d8489a97c  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/mbostock/d3/v3.4.3/d3.min.js --location | sha1sum
36b235e83427b2317c24d3c01b7931018fac840c  -
curl --silent --compressed http://minime.stephan-brumme.com/files/d3/d3-3.4.3.min.zopfli.js.gz | sha1sum
36b235e83427b2317c24d3c01b7931018fac840c  -

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 58576 bytes 1dbed1c40d10c8f04f17ae0d8489a97c (invalid)
jsdelivr 58576 bytes 1dbed1c40d10c8f04f17ae0d8489a97c (invalid)
cdnjs 51635 bytes 1dbed1c40d10c8f04f17ae0d8489a97c (invalid)
unpkg 51330 bytes 1dbed1c40d10c8f04f17ae0d8489a97c July 11, 2016 @ 16:31
cdnhttps 51238 bytes 1dbed1c40d10c8f04f17ae0d8489a97c December 24, 2015 @ 07:33

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
Baidu 51647 bytes d34aff9cda212805dd0c64dca32204d8 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:

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
49043 bytes -5 bytes zopfli --i100000 --mls128 --bsr18 --lazy --ohh December 22, 2015 @ 11:29
49048 bytes -4 bytes zopfli --i10000 --mls128 --bsr18 --lazy --ohh October 14, 2015 @ 05:03
49052 bytes -1 byte zopfli --i10000 --mls64 --bsr18 --lazy --ohh October 14, 2015 @ 04:54
49053 bytes -6 bytes zopfli --i10000 --mls64 --bsr15 --lazy --ohh October 13, 2015 @ 19:22
49059 bytes -3 bytes zopfli --i1000 --mls128 --bsr18 --lazy --ohh September 19, 2015 @ 11:19
49062 bytes -5 bytes zopfli --i1000 --mls64 --bsr15 --lazy --ohh September 19, 2015 @ 11:15
49067 bytes -5 bytes zopfli --i1000 --mls64 --bsr4 --lazy --ohh September 19, 2015 @ 11:12
49072 bytes zopfli --i100 --mls128 --bsr18 --lazy --ohh September 18, 2015 @ 19:54

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 @ 07: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 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
49320 49250 49256 49252 49250 49199 49258 49232 49240 49237 49309 49295 49310 49208 49312
49124 49101 49138 49111 49106 49060 49068 49162 49169 49164 49183 49199 49312 49200 49072
49100 49086 49146 49159 49133 49096 49190 49202 49160 49155 49171 49177 49305 49086 49192
49125 49122 49121 49144 49099 49142 49142 49187 49173 49153 49166 49172 49305 49087 49069
49055 49119 49138 49162 49128 49073 49135 49183 49153 49158 49304 49167 49307 49162 49159
49098 49117 49217 49154 49101 49107 49126 49164 49160 49156 49177 49154 49310 49066 49076
49120 49219 49216 49154 49121 49084 49133 49172 49157 49153 49151 49172 49306 49103 49065
49117 49091 49127 49128 49095 49105 49099 49145 49135 49153 49150 49169 49305 49063 49071
49121 49126 49127 49126 49089 49111 49101 49149 49136 49152 49169 49167 49303 49081 49067
49088 49123 49128 49126 49096 49107 49126 49168 49150 49156 49176 49154 49302 49073 49071
49100 49130 49126 49147 49098 49109 49122 49174 49163 49166 49155 49156 49310 49164 49073
49106 49106 49133 49127 49106 49050 49135 49165 49156 49151 49154 49171 49301 49164 49084
49104 49130 49131 49143 49137 49105 49122 49165 49131 49152 49151 49165 49310 49091 49072
49203 49207 49148 49103 49085 49111 49129 49167 49161 49152 49152 49155 49309 49165 49059
49207 49069 49205 49128 49098 49046 49043 49162 49159 49155 49158 49175 49301 49081 49068
49200 49204 49202 49132 49141 49100 49144 49165 49153 49154 49148 49159 49310 49087 49069
49122 49120 49128 49130 49108 49107 49124 49166 49156 49160 49164 49162 49301 49163 49070
49209 49135 49130 49148 49100 49120 49123 49163 49159 49152 49161 49155 49306 49066 49069
49086 49205 49203 49222 49097 49056 49131 49163 49158 49155 49170 49155 49310 49076 49068
49205 49209 49213 49119 49107 49055 49074 49167 49158 49155 49169 49169 49308 49156 49075
49121 49131 49126 49153 49103 49067 49136 49178 49153 49157 49153 49158 49301 49163 49074
49077 49130 49129 49154 49112 49110 49129 49166 49163 49155 49152 49162 49304 49064 49071
49203 49120 49125 49159 49107 49092 49132 49176 49159 49155 49167 49162 49301 49083 49072

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 49072 bytes 100%
1,000 49059 bytes -13 bytes 100%
10,000 49048 bytes -11 bytes 100%
100,000 49043 bytes -5 bytes 0.87%
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
49341 bytes +298 bytes (+0.61%) +251 bytes
49339 bytes +296 bytes (+0.60%) +249 bytes
49328 bytes +285 bytes (+0.58%) +238 bytes
49275 bytes +232 bytes (+0.47%) +185 bytes
49211 bytes +168 bytes (+0.34%) +121 bytes
49206 bytes +163 bytes (+0.33%) +116 bytes
49112 bytes +69 bytes (+0.14%) +22 bytes
49133 bytes +90 bytes (+0.18%) +43 bytes
49090 bytes +47 bytes (+0.10%)

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 39118 bytes -9925 bytes (-20.24%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 41521 bytes -7522 bytes (-15.34%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 42549 bytes -6494 bytes (-13.24%)
Brotli (Wikipedia) brotli brotli -q 11 44257 bytes -4786 bytes (-9.76%)
LZMA2 (Wikipedia) xz xz -9 44968 bytes -4075 bytes (-8.31%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 46840 bytes -2203 bytes (-4.49%)
ZSTD (Wikipedia) zstd zstd -19 47380 bytes -1663 bytes (-3.39%)

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