Choose a version:
14% The original file has 536985 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 72562 bytes (70.9k, 14%).

After GZIP compression these minified files vary in size:
Boot
  28659 bytes (28.0k)
CDN
cdnjs
  25517 bytes (24.9k)
CDN
cdnhttps
  25290 bytes (24.7k)
CDN
unpkg
  24197 bytes (23.6k)
CDN
gzip -6 (default)
  24163 bytes (23.6k)
local copy
jsdelivr
  24107 bytes (23.5k)
CDN
gzip -9
  24102 bytes (23.5k)
local copy
7zip -mx=9 -tgzip
  23266 bytes (22.7k)
local copy
libdeflate -12
  23257 bytes (22.7k)
local copy
kzip -s0 -rn -b3
  23180 bytes (22.6k)
local copy
pigz -11 -n
  23140 bytes (22.6k)
local copy
Zopfli
  23103 bytes (22.6k)
local copy

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

You will automatically get the smallest lodash 4.16.6 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 1004 bytes by using my lodash 4.16.6 Zopfli version instead of the best available CDN (4.35% smaller than jsdelivr, 23103 vs. 24107 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 --mls4 --bsr20 --lazy --ohh

(found November 1, 2016)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 4  --mls4
block splitting recursion 20  --bsr20
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.6/dist/lodash.min.js --location | md5sum
b2634caa2ae5b5ac506df419a33fafeb  -
curl --silent --compressed https://minime.stephan-brumme.com/files/lodash/lodash-4.16.6.min.zopfli.js.gz | md5sum
b2634caa2ae5b5ac506df419a33fafeb  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 24197 bytes b2634caa2ae5b5ac506df419a33fafeb November 1, 2016 @ 07:44
jsdelivr 24107 bytes b2634caa2ae5b5ac506df419a33fafeb (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
Boot 28659 bytes bddb52359e35c8206ac5764c67a6c5c2 < /**
< * @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 [...]
[...]
November 2, 2016 @ 09:35
cdnjs 25517 bytes bddb52359e35c8206ac5764c67a6c5c2 < /**
< * @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)
cdnhttps 25290 bytes bddb52359e35c8206ac5764c67a6c5c2 < /**
< * @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 [...]
[...]
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.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
23103 bytes -1 byte zopfli --i1000000 --mls4 --bsr20 --lazy --ohh November 1, 2016 @ 16:11
23104 bytes -1 byte zopfli --i100000 --mls4 --bsr20 --lazy --ohh November 1, 2016 @ 09:27
23105 bytes -2 bytes zopfli --i100000 --mls2 --bsr15 --lazy --ohh November 1, 2016 @ 08:23
23107 bytes -1 byte zopfli --i10000 --mls2 --bsr15 --lazy --ohh November 1, 2016 @ 07:52
23108 bytes -2 bytes zopfli --i1000 --mls2 --bsr15 --lazy --ohh November 1, 2016 @ 07:48
23110 bytes -6 bytes zopfli --i1000 --mls16384 --bsr15 --lazy --ohh November 1, 2016 @ 07:48
23116 bytes zopfli --i100 --mls16384 --bsr15 --lazy --ohh November 1, 2016 @ 07:46

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

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
23161 23161 23159 23155 23152 23157 23152 23153 23154 23156 23158 23143 23152 23156 23158
23143 23137 23146 23175 23145 23135 23132 23133 23138 23132 23129 23149 23135 23145 23131
23128 23135 23132 23129 23125 23116 23119 23116 23117 23117 23134 23123 23114 23114 23114
23123 23110 23122 23116 23132 23119 23129 23128 23128 23130 23122 23116 23137 23116 23115
23119 23122 23134 23125 23128 23131 23130 23129 23128 23115 23112 23116 23119 23115 23114
23131 23121 23136 23179 23137 23129 23123 23128 23128 23114 23112 23141 23142 23128 23125
23118 23117 23120 23132 23129 23118 23107 23132 23128 23129 23110 23120 23115 23120 23114
23141 23126 23127 23156 23127 23144 23117 23116 23129 23113 23130 23129 23129 23126 23128
23113 23106 23108 23116 23130 23116 23127 23129 23117 23111 23131 23129 23117 23124 23115
23155 23110 23133 23139 23130 23141 23129 23135 23128 23112 23116 23119 23120 23115 23128
23138 23125 23106 23128 23110 23130 23120 23116 23116 23117 23112 23117 23118 23126 23128
23104 23106 23136 23114 23129 23119 23128 23129 23129 23129 23117 23117 23137 23106 23115
23113 23124 23139 23116 23138 23112 23116 23128 23116 23112 23113 23118 23118 23115 23128
23122 23122 23136 23117 23142 23118 23129 23115 23118 23110 23113 23129 23128 23127 23129
23117 23114 23106 23116 23127 23128 23117 23128 23128 23112 23117 23134 23118 23114 23115
23130 23125 23124 23136 23139 23128 23140 23132 23129 23115 23129 23118 23127 23115 23130
23115 23103 23110 23116 23126 23119 23116 23129 23130 23114 23116 23110 23119 23132 23116
23136 23122 23107 23127 23128 23118 23129 23116 23117 23117 23130 23117 23117 23124 23115
23129 23126 23110 23115 23138 23118 23128 23118 23114 23118 23113 23118 23119 23126 23128
23121 23107 23107 23116 23130 23117 23129 23128 23130 23116 23112 23119 23117 23114 23114
23122 23110 23113 23163 23137 23118 23116 23117 23115 23111 23111 23131 23118 23126 23128
23110 23111 23107 23114 23138 23119 23130 23116 23118 23116 23130 23118 23117 23115 23129
23138 23134 23122 23152 23126 23117 23117 23116 23130 23117 23131 23119 23120 23118 23117

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 23116 bytes 100%
1,000 23108 bytes -8 bytes 100%
10,000 23107 bytes -1 byte 100%
100,000 23104 bytes -3 bytes 3.77%
1,000,000 23103 bytes -1 byte 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
23206 bytes +103 bytes (+0.45%) +26 bytes
23359 bytes +256 bytes (+1.11%) +179 bytes
23237 bytes +134 bytes (+0.58%) +57 bytes
23180 bytes +77 bytes (+0.33%)
23195 bytes +92 bytes (+0.40%) +15 bytes
23199 bytes +96 bytes (+0.42%) +19 bytes
23196 bytes +93 bytes (+0.40%) +16 bytes
23217 bytes +114 bytes (+0.49%) +37 bytes
23235 bytes +132 bytes (+0.57%) +55 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 19418 bytes -3685 bytes (-15.95%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 20057 bytes -3046 bytes (-13.18%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 20872 bytes -2231 bytes (-9.66%)
Brotli (Wikipedia) brotli brotli -q 11 21625 bytes -1478 bytes (-6.40%)
LZMA2 (Wikipedia) xz xz -9 22132 bytes -971 bytes (-4.20%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 22467 bytes -636 bytes (-2.75%)
Zstandard (Wikipedia) zstd zstd -19 22978 bytes -125 bytes (-0.54%)

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