Choose a version:
14% The original file has 539837 bytes (527.2k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 73155 bytes (71.4k, 14%).

After GZIP compression these minified files vary in size:
Boot
  25348 bytes (24.8k)
CDN
cdnjs
  24593 bytes (24.0k)
CDN
unpkg
  24412 bytes (23.8k)
CDN
gzip -6 (default)
  24392 bytes (23.8k)
local copy
gzip -9
  24323 bytes (23.8k)
local copy
7zip -mx=9 -tgzip
  23493 bytes (22.9k)
local copy
libdeflate -12
  23484 bytes (22.9k)
local copy
zultra
  23433 bytes (22.9k)
local copy
kzip -s0 -rn -b3
  23406 bytes (22.9k)
local copy
pigz -11 -n
  23392 bytes (22.8k)
local copy
Zopfli
  23335 bytes (22.8k)
local copy
Zopfli (defluff)
  23334 bytes (22.8k)
local copy

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

You will automatically get the smallest lodash 4.17.9 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 1077 bytes by using my lodash 4.17.9 Zopfli version instead of the best available CDN (4.62% smaller than unpkg, 23335 vs. 24412 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 --mls8 --bsr22 --lazy --ohh

(found July 5, 2018)
Description Value Parameter
iterations 100000  --i100000
maximum blocks 8  --mb8
maximum length score 8  --mls8
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 1 more byte (23334 bytes).

Verify file integrity

After decompression, my uncompressed files are identical to the original ones:

MD5:
curl --silent --compressed https://raw.githubusercontent.com/lodash/lodash/4.17.9/dist/lodash.min.js --location | md5sum
6ec4fc5defa1ac446e08243fce0694e6  -
curl --silent --compressed https://minime.stephan-brumme.com/files/lodash/lodash-4.17.9.min.zopfli.js.gz | md5sum
6ec4fc5defa1ac446e08243fce0694e6  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/lodash/lodash/4.17.9/dist/lodash.min.js --location | sha1sum
59b1f24f9d69a9bd91ad5edcf649041362609c62  -
curl --silent --compressed https://minime.stephan-brumme.com/files/lodash/lodash-4.17.9.min.zopfli.js.gz | sha1sum
59b1f24f9d69a9bd91ad5edcf649041362609c62  -

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Boot 25348 bytes 6ec4fc5defa1ac446e08243fce0694e6 (invalid)
cdnjs 24593 bytes 6ec4fc5defa1ac446e08243fce0694e6 (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
unpkg 24412 bytes 3b37864847459979b900d7ba3e9f6114 < }function A(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r); [...]
> }function A(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r); [...]
< }var T,$=1/0,F=NaN,N=[["ary",128],["bind",1],["bindKey",2] [...]
> }var T,$=1/0,F=NaN,N=[["ary",128],["bind",1],["bindKey",2] [...]
< Ln["[object Error]"]=Ln["[object Function]"]=Ln["[object W [...]
< try{var n=Nn&&Nn.f&&Nn.f("util").types;return n?n:Zn&&Zn.b [...]
< "\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\x [...]
< "\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u010 [...]
< "\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u013 [...]
< "\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015 [...]
[...]
(invalid)

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

Other Versions

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

4.17.21, 4.17.20, 4.17.19, 4.17.18, 4.17.17, 4.17.16, 4.17.15, 4.17.14, 4.17.13, 4.17.12, 4.17.11, 4.17.10, 4.17.9, 4.17.5, 4.17.4, 4.17.3, 4.17.2, 4.17.1, 4.17.0, 4.16.6, 4.16.5, 4.16.4, 4.16.3, 4.16.2, 4.16.1, 4.16.0, 4.15.0, 4.14.2, 4.14.1, 4.14.0, 4.13.1, 4.13.0, 4.12.0, 4.11.2, 4.11.1, 4.11.0, 4.10.0,
4.9.0, 4.8.2, 4.8.1, 4.8.0, 4.7.0, 4.6.1, 4.6.0, 4.5.1, 4.5.0, 4.4.0, 4.3.0, 4.2.1, 4.2.0, 4.1.0, 4.0.1, 4.0.0

The project site contains an overview how well these versions were compressed.
Other interesting projects are AngularJS, BackboneJS, Bootstrap, D3, Dojo, Ember, jQuery, Knockout, React, Socket.IO, ThreeJS, UnderscoreJS and Vue.

Changelog

Best Zopfli parameters so far:
Size Improvement Parameters Found
23335 bytes -2 bytes zopfli --i100000 --mls8 --bsr22 --lazy --ohh July 5, 2018 @ 18:46
23337 bytes -1 byte zopfli --i10000 --mls8 --bsr22 --lazy --ohh July 5, 2018 @ 17:52
23338 bytes -4 bytes zopfli --i1000 --mls8 --bsr22 --lazy --ohh July 5, 2018 @ 16:25
23342 bytes -3 bytes zopfli --i1000 --mls8 --bsr23 --lazy --ohh July 5, 2018 @ 16:25
23345 bytes zopfli --i100 --mls8 --bsr22 --lazy --ohh July 5, 2018 @ 16:08

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

Most recent activity on July 20, 2020 @ 12:53.

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
23389 23385 23376 23379 23383 23382 23379 23380 23378 23403 23389 23370 23373 23376 23377
23365 23402 23367 23370 23368 23378 23365 23370 23401 23365 23368 23365 23368 23360 23371
23351 23365 23366 23348 23350 23348 23351 23359 23364 23348 23368 23365 23364 23347 23362
23350 23350 23366 23374 23374 23349 23366 23358 23360 23408 23411 23366 23360 23349 23363
23365 23353 23357 23365 23371 23365 23360 23359 23348 23358 23358 23358 23360 23348 23363
23366 23351 23385 23389 23377 23376 23349 23379 23361 23361 23365 23349 23361 23350 23347
23352 23356 23375 23373 23365 23363 23349 23348 23349 23360 23360 23353 23359 23349 23353
23364 23366 23370 23377 23376 23364 23373 23371 23368 23361 23386 23407 23364 23349 23363
23348 23350 23336 23348 23358 23357 23349 23354 23349 23346 23364 23362 23365 23349 23362
23364 23352 23372 23374 23389 23365 23365 23377 23368 23356 23362 23372 23349 23365 23358
23350 23351 23376 23350 23350 23348 23350 23359 23361 23358 23360 23355 23361 23374 23362
23349 23348 23364 23373 23375 23350 23357 23360 23360 23360 23360 23362 23362 23350 23363
23368 23366 23356 23365 23379 23348 23359 23347 23347 23349 23387 23360 23358 23349 23350
23351 23349 23349 23373 23379 23376 23372 23372 23364 23358 23347 23363 23358 23347 23350
23365 23349 23352 23373 23364 23349 23360 23348 23364 23355 23356 23362 23350 23349 23357
23364 23366 23369 23379 23372 23372 23373 23372 23358 23359 23364 23359 23349 23374 23363
23351 23350 23358 23360 23378 23359 23359 23358 23361 23363 23364 23408 23358 23349 23350
23366 23369 23357 23364 23365 23349 23360 23355 23367 23361 23348 23358 23358 23348 23363
23365 23365 23335 23365 23374 23359 23368 23349 23362 23362 23362 23362 23349 23372 23349
23349 23351 23340 23373 23361 23349 23367 23361 23347 23362 23385 23408 23360 23347 23350
23351 23350 23357 23392 23376 23348 23357 23359 23361 23397 23356 23362 23357 23373 23348
23350 23350 23363 23364 23362 23358 23348 23346 23361 23358 23348 23411 23359 23349 23348
23365 23366 23365 23375 23376 23361 23347 23347 23368 23356 23364 23366 23348 23348 23354

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 23345 bytes 100%
1,000 23338 bytes -7 bytes 100%
10,000 23337 bytes -1 byte 100%
100,000 23335 bytes -2 bytes 0.58%
1,000,000 23335 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
23433 bytes +98 bytes (+0.42%) +27 bytes
23586 bytes +251 bytes (+1.08%) +180 bytes
23465 bytes +130 bytes (+0.56%) +59 bytes
23406 bytes +71 bytes (+0.30%)
23428 bytes +93 bytes (+0.40%) +22 bytes
23433 bytes +98 bytes (+0.42%) +27 bytes
23429 bytes +94 bytes (+0.40%) +23 bytes
23451 bytes +116 bytes (+0.50%) +45 bytes
23474 bytes +139 bytes (+0.60%) +68 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 - but your browser doesn't support it.
Algorithm Program Parameters Size Compared To Best Zopfli
ZPAQ (Wikipedia) zpaq zpaq -method 69 19574 bytes -3761 bytes (-16.12%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 20224 bytes -3111 bytes (-13.33%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 21019 bytes -2316 bytes (-9.93%)
Brotli (Wikipedia) brotli brotli -q 11 21837 bytes -1498 bytes (-6.42%)
LZMA2 (Wikipedia) xz xz -9 22316 bytes -1019 bytes (-4.37%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 22554 bytes -781 bytes (-3.35%)
Zstandard (Wikipedia) zstd zstd -19 23127 bytes -208 bytes (-0.89%)

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