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

After GZIP compression these minified files vary in size:
Boot
  28064 bytes (27.4k)
CDN
cdnjs
  25029 bytes (24.4k)
CDN
unpkg
  23725 bytes (23.2k)
CDN
gzip -6 (default)
  23665 bytes (23.1k)
local copy
jsdelivr
  23609 bytes (23.1k)
CDN
gzip -9
  23602 bytes (23.0k)
local copy
libdeflate -12
  22797 bytes (22.3k)
local copy
7zip -mx=9 -tgzip
  22791 bytes (22.3k)
local copy
kzip -s0 -rn -b6
  22738 bytes (22.2k)
local copy
zultra
  22733 bytes (22.2k)
local copy
pigz -11 -n
  22678 bytes (22.1k)
local copy
Zopfli
  22643 bytes (22.1k)
local copy
Zopfli (defluff)
  22642 bytes (22.1k)
local copy

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

You will automatically get the smallest lodash 4.16.1 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 966 bytes by using my lodash 4.16.1 Zopfli version instead of the best available CDN (4.27% smaller than jsdelivr, 22643 vs. 23609 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 --mls8 --bsr14 --lazy --ohh

(found September 22, 2016)
Description Value Parameter
iterations 1000000  --i1000000
maximum blocks 8  --mb8
maximum length score 8  --mls8
block splitting recursion 14  --bsr14
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 (22642 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.1/dist/lodash.min.js --location | md5sum
41883d2855be414b859c20ecf9dd6274  -
curl --silent --compressed https://minime.stephan-brumme.com/files/lodash/lodash-4.16.1.min.zopfli.js.gz | md5sum
41883d2855be414b859c20ecf9dd6274  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
unpkg 23725 bytes 41883d2855be414b859c20ecf9dd6274 September 21, 2016 @ 10:51
jsdelivr 23609 bytes 41883d2855be414b859c20ecf9dd6274 (invalid)

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
Boot 28064 bytes f6737d37b38b5b52ba76e8d12a46ac7a < /**
< * @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 C [...]
[...]
September 21, 2016 @ 17:15
cdnjs 25029 bytes f6737d37b38b5b52ba76e8d12a46ac7a < /**
< * @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 C [...]
[...]
(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
22643 bytes -1 byte zopfli --i1000000 --mls8 --bsr14 --lazy --ohh September 22, 2016 @ 01:41
22644 bytes -2 bytes zopfli --i100000 --mls8 --bsr14 --lazy --ohh September 21, 2016 @ 13:51
22646 bytes -4 bytes zopfli --i10000 --mls8 --bsr14 --lazy --ohh September 21, 2016 @ 12:44
22650 bytes -2 bytes zopfli --i1000 --mls8 --bsr14 --lazy --ohh September 21, 2016 @ 11:25
22652 bytes -5 bytes zopfli --i1000 --mls512 --bsr14 --lazy --ohh September 21, 2016 @ 11:24
22657 bytes zopfli --i100 --mls512 --bsr14 --lazy --ohh September 21, 2016 @ 11:13

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

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
22688 22687 22685 22687 22682 22679 22695 22676 22676 22681 22680 22686 22685 22695 22703
22680 22680 22676 22683 22672 22687 22684 22681 22668 22672 22671 22674 22670 22673 22674
22657 22657 22658 22669 22671 22655 22665 22664 22646 22656 22650 22655 22645 22658 22655
22660 22651 22656 22657 22659 22657 22661 22657 22654 22660 22657 22655 22657 22671 22661
22660 22661 22668 22658 22656 22659 22661 22655 22647 22657 22661 22656 22655 22655 22656
22662 22650 22655 22666 22655 22656 22660 22656 22662 22656 22656 22656 22659 22674 22670
22666 22665 22661 22663 22666 22657 22670 22657 22667 22657 22660 22654 22660 22657 22656
22669 22651 22656 22655 22655 22655 22662 22660 22652 22655 22657 22652 22657 22671 22666
22661 22652 22661 22656 22655 22655 22658 22665 22647 22654 22655 22650 22660 22660 22658
22667 22669 22647 22658 22655 22656 22659 22656 22656 22656 22666 22656 22660 22670 22658
22656 22669 22643 22663 22655 22657 22662 22657 22645 22656 22651 22664 22652 22659 22671
22656 22652 22656 22655 22656 22657 22661 22655 22662 22656 22659 22655 22659 22644 22658
22676 22676 22657 22655 22655 22657 22659 22657 22647 22656 22661 22650 22656 22655 22666
22658 22651 22655 22668 22655 22656 22661 22656 22656 22656 22656 22656 22657 22672 22655
22658 22655 22661 22655 22657 22658 22658 22658 22657 22657 22654 22656 22656 22660 22654
22667 22651 22662 22669 22656 22657 22656 22660 22666 22655 22659 22657 22655 22671 22667
22660 22652 22660 22658 22664 22657 22663 22657 22654 22657 22666 22651 22657 22669 22656
22651 22667 22656 22655 22665 22655 22665 22662 22665 22664 22659 22656 22656 22658 22656
22669 22651 22666 22665 22655 22658 22658 22657 22655 22655 22653 22645 22657 22656 22656
22658 22668 22657 22656 22658 22654 22657 22663 22660 22657 22656 22654 22656 22672 22656
22656 22669 22666 22666 22659 22658 22658 22658 22660 22656 22655 22655 22656 22657 22657
22656 22668 22664 22666 22658 22655 22662 22665 22664 22655 22655 22656 22657 22657 22654
22658 22651 22660 22658 22659 22657 22659 22656 22654 22660 22661 22656 22658 22657 22658

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 22657 bytes 100%
1,000 22650 bytes -7 bytes 100%
10,000 22646 bytes -4 bytes 100%
100,000 22644 bytes -2 bytes 3.19%
1,000,000 22643 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
22743 bytes +100 bytes (+0.44%) +5 bytes
22894 bytes +251 bytes (+1.11%) +156 bytes
22775 bytes +132 bytes (+0.58%) +37 bytes
22780 bytes +137 bytes (+0.61%) +42 bytes
22772 bytes +129 bytes (+0.57%) +34 bytes
22741 bytes +98 bytes (+0.43%) +3 bytes
22738 bytes +95 bytes (+0.42%)
22755 bytes +112 bytes (+0.49%) +17 bytes
22783 bytes +140 bytes (+0.62%) +45 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 - for example, your browser actually supports it !
Algorithm Program Parameters Size Compared To Best Zopfli
ZPAQ (Wikipedia) zpaq zpaq -method 69 19077 bytes -3566 bytes (-15.75%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 19640 bytes -3003 bytes (-13.26%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 20380 bytes -2263 bytes (-9.99%)
Brotli (Wikipedia) brotli brotli -q 11 21172 bytes -1471 bytes (-6.50%)
LZMA2 (Wikipedia) xz xz -9 21660 bytes -983 bytes (-4.34%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 22004 bytes -639 bytes (-2.82%)
Zstandard (Wikipedia) zstd zstd -19 22511 bytes -132 bytes (-0.58%)

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.