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

After GZIP compression these minified files vary in size:
Boot
  36741 bytes (35.9k)
CDN
cdnjs
  29844 bytes (29.1k)
CDN
gzip -6 (default)
  20794 bytes (20.3k)
local copy
Yandex
  20729 bytes (20.2k)
CDN
gzip -9
  20727 bytes (20.2k)
local copy
7zip -mx=9 -tgzip
  20113 bytes (19.6k)
local copy
libdeflate -12
  20101 bytes (19.6k)
local copy
zultra
  20032 bytes (19.6k)
local copy
kzip -s0 -rn -b2
  20030 bytes (19.6k)
local copy
pigz -11 -n
  19977 bytes (19.5k)
local copy
Zopfli
  19948 bytes (19.5k)
local copy

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

You will automatically get the smallest lodash 4.0.0 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 781 bytes by using my lodash 4.0.0 Zopfli version instead of the best available CDN (3.92% smaller than Yandex, 19948 vs. 20729 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 --mls2 --bsr7 --lazy --ohh

(found April 13, 2016)
Description Value Parameter
iterations 100000  --i100000
maximum blocks 8  --mb8
maximum length score 2  --mls2
block splitting recursion 7  --bsr7
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.0.0/dist/lodash.min.js --location | md5sum
3996ad86539d0f308919958039dabc8c  -
curl --silent --compressed https://minime.stephan-brumme.com/files/lodash/lodash-4.0.0.min.zopfli.js.gz | md5sum
3996ad86539d0f308919958039dabc8c  -

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

These CDNs send you the original file:
CDN Size (compressed) MD5 (uncompressed) Timestamp
Yandex 20729 bytes 3996ad86539d0f308919958039dabc8c February 1, 2019 @ 15:45

And some CDNs send you a different file:
CDN Size (compressed) MD5 (uncompressed) Comment / Diff Timestamp
Boot 36741 bytes 8f8e4adc9b0c3677ec3df84a412c8c45 < /**
< * @license
< * lodash 4.0.0 (Custom Build) lodash.com/license | Unders [...]
< * Build: `lodash -o ./dist/lodash.js`
< */
< ;(function(){function n(n,t){return n.set(t[0],t[1]),n}fun [...]
< }return o}function i(n,t){return!!n.length&&-1<v(n,t,0)}fu [...]
< return false}function p(n,t,r){for(var e=-1,u=n.length;++e [...]
< var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}fun [...]
< return r}function E(n){return n&&n.Object===Object?n:null} [...]
[...]
(invalid)
cdnjs 29844 bytes 8f8e4adc9b0c3677ec3df84a412c8c45 < /**
< * @license
< * lodash 4.0.0 (Custom Build) lodash.com/license | Unders [...]
< * Build: `lodash -o ./dist/lodash.js`
< */
< ;(function(){function n(n,t){return n.set(t[0],t[1]),n}fun [...]
< }return o}function i(n,t){return!!n.length&&-1<v(n,t,0)}fu [...]
< return false}function p(n,t,r){for(var e=-1,u=n.length;++e [...]
< var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}fun [...]
< return r}function E(n){return n&&n.Object===Object?n:null} [...]
[...]
(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
19948 bytes -4 bytes zopfli --i100000 --mls2 --bsr7 --lazy --ohh April 13, 2016 @ 11:50
19952 bytes -1 byte zopfli --i10000 --mls64 --bsr30 --lazy --ohh April 12, 2016 @ 18:47
19953 bytes -4 bytes zopfli --i10000 --mls2 --bsr10 --lazy --ohh April 12, 2016 @ 16:08
19957 bytes -5 bytes zopfli --i1000 --mls2 --bsr10 --lazy --ohh April 12, 2016 @ 09:51
19962 bytes zopfli --i100 --mls2 --bsr10 --lazy --ohh April 12, 2016 @ 03:12

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

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 or 100,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
19975 19978 19975 19992 20000 20002 20001 20000 20001 19961 19989 19977 19990 19991 19996
19962 19956 19961 19960 19965 19971 19972 19962 19971 19971 19974 19975 19978 19978 19985
19961 19957 19962 19954 19956 19955 19975 19972 19971 19965 19983 19971 19975 19974 19975
19948 19953 19955 19964 19955 19966 19964 19958 19971 19968 19976 19972 19974 19974 19958
19955 19954 19957 19957 19957 19953 19954 19954 19965 19971 19960 19972 19971 19976 19972
19955 19960 19958 19957 19977 19979 19962 19982 19982 19957 19970 19970 19969 19974 19973
19953 19955 19959 19959 19961 19970 19955 19969 19965 19971 19970 19973 19978 19974 19959
19957 19961 19961 19954 19956 19955 19963 19962 19965 19968 19977 19972 19974 19982 19970
19965 19956 19962 19953 19958 19954 19955 19960 19971 19981 19974 19971 19971 19972 19961
19956 19955 19957 19960 19954 19974 19963 19962 19964 19973 19974 19971 19972 19962 19958
19956 19955 19955 19961 19954 19972 19961 19962 19962 19965 19971 19971 19966 19975 19962
19962 19951 19957 19963 19954 19967 19956 19961 19961 19967 19976 19972 19971 19977 19972
19955 19956 19958 19968 19955 19965 19955 19962 19957 19974 19965 19971 19972 19975 19972
19957 19956 19959 19960 19959 19967 19962 19962 19971 19955 19977 19972 19974 19975 19955
19957 19959 19958 19958 19954 19955 19962 19962 19954 19967 19964 19958 19971 19976 19973
19957 19957 19961 19954 19955 19955 19961 19960 19963 19968 19971 19972 19968 19977 19958
19962 19958 19960 19959 19959 19953 19961 19959 19965 19972 19962 19971 19969 19954 19959
19956 19955 19959 19955 19959 19954 19954 19962 19963 19973 19974 19971 19974 19956 19963
19961 19958 19958 19955 19959 19954 19968 19962 19961 19957 19968 19972 19969 19953 19970
19962 19956 19954 19953 19959 19953 19954 19967 19962 19967 19972 19971 19971 19973 19960
19961 19958 19957 19954 19954 19966 19955 19961 19963 19983 19974 19970 19969 19974 19961
19956 19956 19956 19955 19959 19951 19950 19961 19965 19966 19966 19973 19968 19973 19957
19957 19957 19958 19954 19959 19954 19969 19963 19965 19971 19962 19971 19970 19972 19959

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 19962 bytes 100%
1,000 19956 bytes -6 bytes 100%
10,000 19952 bytes -4 bytes 100%
100,000 19948 bytes -4 bytes 1.16%
1,000,000
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
20036 bytes +88 bytes (+0.44%) +6 bytes
20104 bytes +156 bytes (+0.78%) +74 bytes
20030 bytes +82 bytes (+0.41%)
20039 bytes +91 bytes (+0.46%) +9 bytes
20044 bytes +96 bytes (+0.48%) +14 bytes
20054 bytes +106 bytes (+0.53%) +24 bytes
20083 bytes +135 bytes (+0.68%) +53 bytes
20097 bytes +149 bytes (+0.75%) +67 bytes
20108 bytes +160 bytes (+0.80%) +78 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 17006 bytes -2942 bytes (-14.75%)
RAR (proprietary) RAR rar a -m5 -md64m -mc63:128t -mt1 17244 bytes -2704 bytes (-13.56%)
PPMd (Wikipedia) 7zip 7za a -mx=9 -m0=ppmd 18290 bytes -1658 bytes (-8.31%)
Brotli (Wikipedia) brotli brotli -q 11 18789 bytes -1159 bytes (-5.81%)
LZMA2 (Wikipedia) xz xz -9 19240 bytes -708 bytes (-3.55%)
Burrows-Wheeler transform (Wikipedia) bzip2 bzip2 -9 19339 bytes -609 bytes (-3.05%)
Zstandard (Wikipedia) zstd zstd -19 19850 bytes -98 bytes (-0.49%)

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.