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

After GZIP compression these minified files vary in size:
Boot
  28234 bytes (27.6k)
CDN
cdnjs
  25215 bytes (24.6k)
CDN
cdnhttps
  24992 bytes (24.4k)
CDN
unpkg
  23880 bytes (23.3k)
CDN
gzip -6 (default)
  23821 bytes (23.3k)
local copy
jsdelivr
  23767 bytes (23.2k)
CDN
gzip -9
  23766 bytes (23.2k)
local copy
libdeflate -12
  22955 bytes (22.4k)
local copy
7zip -mx=9 -tgzip
  22947 bytes (22.4k)
local copy
kzip -s0 -rn -b6
  22897 bytes (22.4k)
local copy
pigz -11 -n
  22844 bytes (22.3k)
local copy
Zopfli
  22803 bytes (22.3k)
local copy
Zopfli (defluff)
  22802 bytes (22.3k)
local copy

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

You will automatically get the smallest lodash 4.16.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 964 bytes by using my lodash 4.16.3 Zopfli version instead of the best available CDN (4.23% smaller than jsdelivr, 22803 vs. 23767 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 --i1000000 --mb8 --mls4096 --bsr25 --lazy --ohh

(found October 12, 2016)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 4096  --mls4096
block splitting recursion 25  --bsr25
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 (22802 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.16.3/dist/lodash.min.js --location | md5sum
46e0ee9bd4cd7ab7f6690e69c55cbf04  -
curl --silent --compressed http://minime.stephan-brumme.com/files/lodash/lodash-4.16.3.min.zopfli.js.gz | md5sum
46e0ee9bd4cd7ab7f6690e69c55cbf04  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 23880 bytes 46e0ee9bd4cd7ab7f6690e69c55cbf04 October 11, 2016 @ 05:33
jsdelivr 23767 bytes 46e0ee9bd4cd7ab7f6690e69c55cbf04 (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
Boot 28234 bytes 94a4dade2032746ccd16eaae4870692e < /**
< * @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 25215 bytes 94a4dade2032746ccd16eaae4870692e < /**
< * @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 24992 bytes 94a4dade2032746ccd16eaae4870692e < /**
< * @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
22803 bytes -1 byte zopfli --i1000000 --mls4096 --bsr25 --lazy --ohh October 12, 2016 @ 09:54
22804 bytes -3 bytes zopfli --i100000 --mls4096 --bsr25 --lazy --ohh October 11, 2016 @ 06:48
22807 bytes -1 byte zopfli --i10000 --mls4096 --bsr25 --lazy --ohh October 11, 2016 @ 06:26
22808 bytes -1 byte zopfli --i10000 --mls8192 --bsr12 --lazy --ohh October 11, 2016 @ 06:22
22809 bytes -2 bytes zopfli --i1000 --mls8192 --bsr12 --lazy --ohh October 11, 2016 @ 06:15
22811 bytes -2 bytes zopfli --i1000 --mls2048 --bsr16 --lazy --ohh October 11, 2016 @ 06:15
22813 bytes zopfli --i100 --mls2048 --bsr16 --lazy --ohh October 11, 2016 @ 06:00

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

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
22848 22848 22846 22851 22847 22847 22847 22849 22852 22854 22843 22844 22854 22858 22862
22840 22842 22845 22849 22846 22845 22836 22847 22834 22830 22843 22850 22830 22839 22834
22814 22817 22827 22813 22817 22815 22820 22819 22815 22818 22810 22813 22816 22827 22814
22818 22819 22820 22816 22813 22821 22825 22818 22832 22816 22815 22807 22814 22822 22827
22818 22823 22810 22816 22817 22821 22833 22816 22824 22816 22814 22814 22815 22826 22824
22815 22820 22821 22820 22816 22820 22828 22818 22825 22813 22815 22810 22840 22825 22828
22816 22819 22817 22824 22826 22816 22828 22825 22826 22827 22814 22815 22809 22826 22814
22816 22820 22821 22814 22817 22819 22822 22814 22816 22815 22813 22809 22814 22824 22826
22815 22822 22820 22815 22817 22821 22820 22815 22814 22815 22813 22813 22805 22828 22813
22816 22816 22822 22816 22816 22816 22821 22815 22816 22815 22809 22812 22815 22825 22827
22828 22828 22808 22818 22812 22817 22820 22816 22814 22815 22810 22812 22813 22826 22836
22818 22815 22820 22816 22815 22819 22824 22821 22824 22810 22818 22809 22814 22825 22815
22825 22826 22819 22823 22816 22816 22815 22813 22813 22815 22807 22813 22813 22826 22827
22816 22817 22817 22816 22816 22818 22821 22817 22815 22816 22815 22813 22813 22821 22827
22815 22817 22821 22814 22817 22819 22818 22818 22816 22805 22811 22809 22809 22827 22814
22815 22817 22818 22816 22817 22815 22819 22813 22816 22817 22814 22806 22814 22824 22828
22820 22819 22818 22816 22816 22816 22825 22818 22825 22814 22807 22805 22806 22831 22828
22816 22819 22818 22816 22815 22816 22821 22819 22816 22815 22809 22814 22809 22825 22828
22818 22817 22826 22816 22810 22822 22828 22824 22815 22814 22812 22809 22815 22826 22828
22816 22809 22822 22815 22816 22819 22817 22818 22820 22815 22814 22807 22812 22823 22824
22816 22817 22818 22817 22816 22817 22817 22815 22815 22829 22809 22803 22813 22824 22827
22816 22815 22823 22815 22812 22821 22822 22817 22821 22812 22809 22813 22815 22821 22828
22814 22821 22820 22816 22816 22816 22815 22813 22826 22805 22811 22812 22815 22827 22830

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 22813 bytes 100%
1,000 22809 bytes -4 bytes 100%
10,000 22806 bytes -3 bytes 100%
100,000 22804 bytes -2 bytes 3.48%
1,000,000 22803 bytes -1 byte 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
22901 bytes +98 bytes (+0.43%) +4 bytes
23056 bytes +253 bytes (+1.11%) +159 bytes
22929 bytes +126 bytes (+0.55%) +32 bytes
22937 bytes +134 bytes (+0.59%) +40 bytes
22925 bytes +122 bytes (+0.54%) +28 bytes
22901 bytes +98 bytes (+0.43%) +4 bytes
22897 bytes +94 bytes (+0.41%)
22907 bytes +104 bytes (+0.46%) +10 bytes
22935 bytes +132 bytes (+0.58%) +38 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 19200 bytes -3603 bytes (-15.80%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 19768 bytes -3035 bytes (-13.31%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 20502 bytes -2301 bytes (-10.09%)
Brotli (Wikipedia) brotli brotli -q 11 21341 bytes -1462 bytes (-6.41%)
LZMA2 (Wikipedia) xz xz -9 21820 bytes -983 bytes (-4.31%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 22111 bytes -692 bytes (-3.03%)
ZSTD (Wikipedia) zstd zstd -19 22661 bytes -142 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