Last Updated on July 22, 2020
Lepton with compression charts
Lepton is an open source encoder from Dropbox. It’s written primarily in C++.
Both Guetzli and MozJPEG employ lossy compression algorithms. Lepton is different. It uses lossless compression. This type of compression is employed in compressing software applications, files, and text articles. But JPEG images will typically see little size reduction with standard lossless compression software. Step forward Lepton.
The syntax of Lepton also differs to Guetzli and MozJPEG. To compress a JPEG you need to specify the input and output file names. For example:
$ lepton file.jpg file.lep
Lepton compresses the file and produces the output in its own format. You can’t do anything with that .lep file. If you want to view or edit the file, you’ll have to uncompress the output with:
$ lepton file.lep file.jpg
Dropbox claims its tool reduces JPEGs by about 22%. Let’s see if that claim stacks up.
Yes, the claim seems well founded. Photos with low MPs fared worse, with some missing the claimed 22% compression. But the average compression of all the images we tested was higher than 22%.
Now you might be curious how standard compression fares compressing JPEGs. The chart below shows you’ll see little compression using tools like xz, lrzip, or bzip2. They just aren’t optimized to compress JPEG photos.
Next page: Lepton – Time chart
Pages in this article:
Page 1 – Introduction
Page 2 – Guetzli – Compression charts
Page 3 – Guetzli – Time chart
Page 4 – MozJPEG – Compression charts
Page 5 – MozJPEG – Time chart
Page 6 – Lepton – Compression charts
Page 7 – Lepton – Time chart
Page 8 – Summary
According to the tests I made some years ago to be able to store efficiently invoices and other enterprise documents scans into a document management software without artifacts, even on very small letters, tests that I also extended to web sites pictures processing, here is what I found :
using GIMP as the graphic manipulation program with a :
* progressive .jpg encoding for slow connections enabled,
* 4:4:4 Subsampling method,
* Floating-point for the DCT method,
* only exif data kept (no thumbnail or other orientation/dimensions system)
*** and the most important feature : image colors indexed into a 256 colors optimized palette,
the threshold not to cross to be absolutely sure there will be no artifacts in the final picture, nor color problems (except, of course, with gradations, that do not fit in this process) is : 65 %.
My 2¢