Dropbox has open sourced its JPEG compression algorithm that further reduces the file size of JPEG images by 22 percent. The compression works by predicting the brightness values of some pixels. The compression is being used by Dropbox to save many petabytes of space. Lepton is a kind of compression that works during streaming, which means that the files can be compressed and uncompressed during data transfer operations.
Lepton only works for JPEG files, and not all kinds of image file formats. JPEG itself is a lossy file format, image information is lost during compression. Lepton is a lossless compression technique for the lossy JPEG format. Lepton can compress the files for storage, and restore the original version of the file on demand. JPEG files uploaded by users are compressed using Lepton in their internal servers, and decompressed when the files are delivered to a user.
Lepton can compress files at the rate of 5MBps, and restore them at the rate of 15MBps. Lepton uses an arithmetic coder to save the images, which is a very efficient way of saving data. For those wanting to take a deep dive into the code, Lepton is available on GitHub .