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

After GZIP compression these minified files vary in size:
Boot
  28670 bytes (28.0k)
CDN
cdnjs
  25519 bytes (24.9k)
CDN
unpkg
  24206 bytes (23.6k)
CDN
gzip -6 (default)
  24176 bytes (23.6k)
local copy
jsdelivr
  24116 bytes (23.6k)
CDN
gzip -9
  24109 bytes (23.5k)
local copy
7zip -mx=9 -tgzip
  23266 bytes (22.7k)
local copy
libdeflate -12
  23266 bytes (22.7k)
local copy
zultra
  23227 bytes (22.7k)
local copy
kzip -s0 -rn -b3
  23188 bytes (22.6k)
local copy
pigz -11 -n
  23139 bytes (22.6k)
local copy
Zopfli
  23109 bytes (22.6k)
local copy

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

You will automatically get the smallest lodash 4.16.5 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 1007 bytes by using my lodash 4.16.5 Zopfli version instead of the best available CDN (4.36% smaller than jsdelivr, 23109 vs. 24116 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 --mls2048 --bsr40 --lazy --ohh

(found October 31, 2016)
Description Value Parameter
iterations 100000  --i100000
maximum blocks 8  --mb8
maximum length score 2048  --mls2048
block splitting recursion 40  --bsr40
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

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.16.5/dist/lodash.min.js --location | md5sum
a6e06ed4f792aff3ed4f20171e503483  -
curl --silent --compressed https://minime.stephan-brumme.com/files/lodash/lodash-4.16.5.min.zopfli.js.gz | md5sum
a6e06ed4f792aff3ed4f20171e503483  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 24206 bytes a6e06ed4f792aff3ed4f20171e503483 October 31, 2016 @ 10:07
jsdelivr 24116 bytes a6e06ed4f792aff3ed4f20171e503483 October 31, 2016 @ 23:45

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
Boot 28670 bytes 00bc0be9c594a6004d5be19b9565b504 < /**
< * @license
< * lodash lodash.com/license | Underscore.js 1.8.3 undersc [...]
< */
< ;(function(){function n(n,t){return n.set(t[0],t[1]),n}fun [...]
< return n}function o(n,t){for(var r=-1,e=null==n?0:n.length [...]
< return n}function h(n,t,r,e){var u=-1,i=null==n?0:n.length [...]
< --r;for(var e=n.length;++r<e;)if(n[r]===t){n=r;break n}n=- [...]
< return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;) [...]
< return"\\"+Tn[n]}function L(n){var t=-1,r=Array(n.size);re [...]
[...]
October 31, 2016 @ 07:33
cdnjs 25519 bytes 00bc0be9c594a6004d5be19b9565b504 < /**
< * @license
< * lodash lodash.com/license | Underscore.js 1.8.3 undersc [...]
< */
< ;(function(){function n(n,t){return n.set(t[0],t[1]),n}fun [...]
< return n}function o(n,t){for(var r=-1,e=null==n?0:n.length [...]
< return n}function h(n,t,r,e){var u=-1,i=null==n?0:n.length [...]
< --r;for(var e=n.length;++r<e;)if(n[r]===t){n=r;break n}n=- [...]
< return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;) [...]
< return"\\"+Tn[n]}function L(n){var t=-1,r=Array(n.size);re [...]
[...]
(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
23109 bytes -1 byte zopfli --i100000 --mls2048 --bsr40 --lazy --ohh October 31, 2016 @ 10:26
23110 bytes -1 byte zopfli --i100000 --mls2048 --bsr16 --lazy --ohh October 31, 2016 @ 09:53
23111 bytes -2 bytes zopfli --i100000 --mls8 --bsr18 --lazy --ohh October 31, 2016 @ 07:10
23113 bytes -1 byte zopfli --i10000 --mls2048 --bsr10 --lazy --ohh October 31, 2016 @ 06:53
23114 bytes -1 byte zopfli --i1000 --mls8 --bsr18 --lazy --ohh October 31, 2016 @ 06:33
23115 bytes -1 byte zopfli --i1000 --mls2048 --bsr10 --lazy --ohh October 31, 2016 @ 06:33
23116 bytes -4 bytes zopfli --i1000 --mls2048 --bsr40 --lazy --ohh October 31, 2016 @ 06:32
23120 bytes zopfli --i100 --mls2048 --bsr40 --lazy --ohh October 31, 2016 @ 06:26

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:51.

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
23163 23167 23168 23158 23158 23158 23154 23155 23158 23159 23164 23147 23157 23161 23162
23149 23140 23182 23182 23151 23162 23138 23142 23143 23143 23132 23153 23137 23153 23133
23142 23137 23141 23137 23123 23129 23124 23127 23120 23122 23137 23120 23135 23121 23120
23130 23124 23117 23124 23132 23124 23131 23141 23140 23133 23121 23127 23147 23135 23122
23134 23123 23140 23136 23145 23132 23127 23124 23123 23120 23118 23122 23121 23135 23134
23125 23137 23129 23147 23132 23152 23126 23133 23132 23116 23137 23147 23138 23134 23144
23124 23124 23138 23127 23128 23125 23131 23130 23130 23131 23111 23124 23116 23125 23120
23144 23133 23112 23121 23132 23138 23125 23135 23132 23118 23148 23133 23139 23136 23135
23124 23124 23114 23122 23134 23125 23123 23122 23122 23118 23118 23120 23147 23140 23121
23130 23123 23111 23169 23133 23134 23123 23135 23122 23119 23120 23123 23122 23122 23135
23124 23137 23142 23138 23125 23123 23125 23122 23122 23120 23117 23123 23120 23127 23134
23131 23122 23141 23122 23133 23124 23126 23134 23132 23134 23117 23120 23147 23132 23119
23145 23137 23116 23121 23150 23138 23126 23121 23119 23120 23109 23122 23120 23134 23119
23125 23122 23139 23122 23122 23124 23123 23122 23121 23118 23117 23132 23141 23136 23136
23129 23124 23111 23133 23132 23133 23123 23124 23121 23118 23112 23135 23121 23134 23120
23138 23141 23128 23135 23144 23121 23126 23121 23122 23114 23119 23123 23120 23134 23136
23124 23124 23112 23121 23144 23125 23123 23122 23132 23118 23122 23111 23120 23140 23121
23136 23136 23112 23139 23132 23120 23124 23123 23122 23112 23113 23122 23122 23122 23122
23139 23139 23130 23124 23120 23136 23124 23123 23120 23119 23116 23122 23121 23135 23134
23121 23121 23112 23124 23135 23121 23123 23123 23133 23117 23117 23122 23122 23134 23120
23125 23122 23118 23124 23132 23122 23123 23123 23122 23116 23112 23132 23122 23134 23121
23125 23136 23130 23136 23148 23146 23134 23122 23122 23120 23117 23122 23119 23133 23135
23145 23137 23127 23135 23129 23124 23126 23123 23122 23112 23109 23121 23121 23134 23121

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 23120 bytes 100%
1,000 23114 bytes -6 bytes 100%
10,000 23113 bytes -1 byte 100%
100,000 23109 bytes -4 bytes 4.93%
1,000,000 23109 bytes 0.58%
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
23212 bytes +103 bytes (+0.45%) +24 bytes
23361 bytes +252 bytes (+1.09%) +173 bytes
23246 bytes +137 bytes (+0.59%) +58 bytes
23188 bytes +79 bytes (+0.34%)
23204 bytes +95 bytes (+0.41%) +16 bytes
23209 bytes +100 bytes (+0.43%) +21 bytes
23196 bytes +87 bytes (+0.38%) +8 bytes
23216 bytes +107 bytes (+0.46%) +28 bytes
23235 bytes +126 bytes (+0.55%) +47 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 19429 bytes -3680 bytes (-15.92%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 20066 bytes -3043 bytes (-13.17%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 20871 bytes -2238 bytes (-9.68%)
Brotli (Wikipedia) brotli brotli -q 11 21604 bytes -1505 bytes (-6.51%)
LZMA2 (Wikipedia) xz xz -9 22124 bytes -985 bytes (-4.26%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 22446 bytes -663 bytes (-2.87%)
Zstandard (Wikipedia) zstd zstd -19 22986 bytes -123 bytes (-0.53%)

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.