Choose a version:
13% The original file has 534841 bytes (522.3k) and is available from the project website.
There you can find the official minified version, too, which brings down the size to 71753 bytes (70.1k, 13%).

After GZIP compression these minified files vary in size:
Boot
  28351 bytes (27.7k)
CDN
cdnjs
  25311 bytes (24.7k)
CDN
cdnhttps
  25093 bytes (24.5k)
CDN
unpkg
  23995 bytes (23.4k)
CDN
gzip -6 (default)
  23956 bytes (23.4k)
local copy
jsdelivr
  23896 bytes (23.3k)
CDN
gzip -9
  23890 bytes (23.3k)
local copy
libdeflate -12
  23077 bytes (22.5k)
local copy
7zip -mx=9 -tgzip
  23048 bytes (22.5k)
local copy
kzip -s0 -rn -b5
  22991 bytes (22.5k)
local copy
pigz -11 -n
  22950 bytes (22.4k)
local copy
Zopfli
  22905 bytes (22.4k)
local copy

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

You will automatically get the smallest lodash 4.16.4 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 991 bytes by using my lodash 4.16.4 Zopfli version instead of the best available CDN (4.33% smaller than jsdelivr, 22905 vs. 23896 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 --mls512 --bsr23 --lazy --ohh

(found October 11, 2016)
Description Value Parameter
iterations 100000  --i100000
maximum blocks 8  --mb8
maximum length score 512  --mls512
block splitting recursion 23  --bsr23
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.4/dist/lodash.min.js --location | md5sum
92c65ba44ea8fd9891f79b7a7ae3fbc1  -
curl --silent --compressed http://minime.stephan-brumme.com/files/lodash/lodash-4.16.4.min.zopfli.js.gz | md5sum
92c65ba44ea8fd9891f79b7a7ae3fbc1  -

SHA1:
curl --silent --compressed https://raw.githubusercontent.com/lodash/lodash/4.16.4/dist/lodash.min.js --location | sha1sum
2e119d0f3f804f05611b4996bba7765e08eb473f  -
curl --silent --compressed http://minime.stephan-brumme.com/files/lodash/lodash-4.16.4.min.zopfli.js.gz | sha1sum
2e119d0f3f804f05611b4996bba7765e08eb473f  -

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 23995 bytes 92c65ba44ea8fd9891f79b7a7ae3fbc1 October 11, 2016 @ 05:35
jsdelivr 23896 bytes 92c65ba44ea8fd9891f79b7a7ae3fbc1 (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
Boot 28351 bytes 116c3873636a7d05483bf6cd82076039 < /**
< * @license
< * lodash lodash.com/license | Underscore.js 1.8.3 undersc [...]
< */
< ;(function(){function t(t,n){return t.set(n[0],n[1]),t}fun [...]
< return t}function o(t,n){for(var r=-1,e=t?t.length:0;++r<e [...]
< var u=-1,i=t?t.length:0;for(e&&i&&(r=t[++u]);++u<i;)r=n(r, [...]
< break t}t=-1}else t=g(t,b,r);return t}function y(t,n,r,e){ [...]
< var i=n(t[e]);i!==F&&(r=r===F?i:r+i)}return r}function E(t [...]
< return t.forEach(function(t,e){r[++n]=[e,t]}),r}function U [...]
[...]
(invalid)
cdnjs 25311 bytes 116c3873636a7d05483bf6cd82076039 < /**
< * @license
< * lodash lodash.com/license | Underscore.js 1.8.3 undersc [...]
< */
< ;(function(){function t(t,n){return t.set(n[0],n[1]),t}fun [...]
< return t}function o(t,n){for(var r=-1,e=t?t.length:0;++r<e [...]
< var u=-1,i=t?t.length:0;for(e&&i&&(r=t[++u]);++u<i;)r=n(r, [...]
< break t}t=-1}else t=g(t,b,r);return t}function y(t,n,r,e){ [...]
< var i=n(t[e]);i!==F&&(r=r===F?i:r+i)}return r}function E(t [...]
< return t.forEach(function(t,e){r[++n]=[e,t]}),r}function U [...]
[...]
(invalid)
cdnhttps 25093 bytes 116c3873636a7d05483bf6cd82076039 < /**
< * @license
< * lodash lodash.com/license | Underscore.js 1.8.3 undersc [...]
< */
< ;(function(){function t(t,n){return t.set(n[0],n[1]),t}fun [...]
< return t}function o(t,n){for(var r=-1,e=t?t.length:0;++r<e [...]
< var u=-1,i=t?t.length:0;for(e&&i&&(r=t[++u]);++u<i;)r=n(r, [...]
< break t}t=-1}else t=g(t,b,r);return t}function y(t,n,r,e){ [...]
< var i=n(t[e]);i!==F&&(r=r===F?i:r+i)}return r}function E(t [...]
< return t.forEach(function(t,e){r[++n]=[e,t]}),r}function U [...]
[...]
November 22, 2016 @ 16:35

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

Other Versions

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

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
22905 bytes -4 bytes zopfli --i100000 --mls512 --bsr23 --lazy --ohh October 11, 2016 @ 06:46
22909 bytes -1 byte zopfli --i10000 --mls512 --bsr23 --lazy --ohh October 11, 2016 @ 06:22
22910 bytes -6 bytes zopfli --i1000 --mls512 --bsr23 --lazy --ohh October 11, 2016 @ 06:15
22916 bytes zopfli --i100 --mls512 --bsr23 --lazy --ohh October 11, 2016 @ 05:49

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

Most recent activity on January 25, 2017 @ 15:24.

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
22949 22952 22947 22947 22947 22950 22946 22949 22950 22954 22961 22951 22946 22960 22959
22945 22938 22940 22954 22935 22955 22937 22954 22943 22935 22947 22950 22936 22948 22942
22930 22920 22920 22918 22923 22921 22931 22918 22920 22917 22919 22909 22920 22920 22935
22923 22924 22913 22921 22928 22932 22918 22908 22930 22921 22922 22924 22928 22934 22942
22936 22920 22912 22920 22919 22919 22925 22922 22919 22924 22918 22918 22925 22919 22919
22927 22932 22913 22929 22932 22919 22925 22921 22919 22917 22913 22912 22930 22936 22931
22933 22930 22925 22919 22919 22921 22931 22914 22913 22918 22915 22927 22912 22917 22932
22935 22930 22912 22917 22919 22921 22924 22909 22919 22910 22919 22912 22930 22928 22931
22923 22923 22906 22920 22921 22918 22922 22929 22921 22924 22916 22912 22931 22933 22918
22935 22921 22912 22922 22932 22934 22921 22934 22921 22919 22934 22930 22919 22921 22933
22933 22931 22922 22929 22922 22919 22930 22927 22920 22916 22918 22912 22930 22931 22944
22922 22921 22913 22919 22931 22929 22924 22920 22928 22916 22920 22919 22932 22934 22944
22929 22930 22908 22928 22918 22917 22929 22920 22920 22918 22916 22913 22919 22930 22931
22934 22933 22912 22919 22920 22921 22925 22922 22920 22910 22921 22913 22920 22927 22931
22921 22920 22914 22918 22920 22921 22921 22921 22911 22919 22916 22914 22914 22924 22920
22938 22937 22925 22937 22930 22918 22922 22922 22912 22918 22917 22915 22914 22935 22931
22931 22920 22914 22921 22921 22918 22923 22922 22912 22917 22917 22913 22913 22933 22919
22939 22936 22911 22935 22920 22919 22924 22917 22913 22916 22914 22912 22907 22919 22917
22939 22930 22918 22917 22928 22921 22930 22912 22908 22916 22918 22914 22915 22936 22932
22921 22921 22911 22920 22921 22917 22922 22920 22905 22916 22912 22914 22915 22934 22918
22936 22931 22915 22919 22921 22920 22922 22918 22918 22924 22917 22913 22912 22932 22915
22927 22919 22912 22922 22921 22920 22925 22913 22919 22918 22918 22914 22914 22919 22932
22933 22929 22915 22921 22919 22919 22920 22921 22913 22918 22919 22911 22913 22906 22921

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 22916 bytes 100%
1,000 22910 bytes -6 bytes 100%
10,000 22909 bytes -1 byte 100%
100,000 22905 bytes -4 bytes 4.35%
1,000,000 22905 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
22991 bytes +86 bytes (+0.38%)
23152 bytes +247 bytes (+1.08%) +161 bytes
23033 bytes +128 bytes (+0.56%) +42 bytes
23037 bytes +132 bytes (+0.58%) +46 bytes
23031 bytes +126 bytes (+0.55%) +40 bytes
22991 bytes +86 bytes (+0.38%)
22994 bytes +89 bytes (+0.39%) +3 bytes
23018 bytes +113 bytes (+0.49%) +27 bytes
23043 bytes +138 bytes (+0.60%) +52 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 19273 bytes -3632 bytes (-15.86%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 19844 bytes -3061 bytes (-13.36%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 20583 bytes -2322 bytes (-10.14%)
Brotli (Wikipedia) brotli brotli -q 11 21404 bytes -1501 bytes (-6.55%)
LZMA2 (Wikipedia) xz xz -9 21908 bytes -997 bytes (-4.35%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 22213 bytes -692 bytes (-3.02%)
ZSTD (Wikipedia) zstd zstd -19 22764 bytes -141 bytes (-0.62%)

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