Swap libjpeg for MozJPEG in an existing image pipeline to get smaller JPEG files with no code changes
Losslessly re-compress existing JPEG files using progressive encoding to reduce their size without re-encoding
Embed MozJPEG in a web service that generates JPEG thumbnails to cut bandwidth costs
Use the included command-line tool to test compression output before integrating the library
| mozilla/mozjpeg | pufferai/pufferlib | kbengine/kbengine | |
|---|---|---|---|
| Stars | 5,675 | 5,677 | 5,684 |
| Language | C | C | C |
| Setup difficulty | moderate | moderate | hard |
| Complexity | 3/5 | 4/5 | 5/5 |
| Audience | developer | researcher | developer |
Figures from each repo's GitHub metadata at analysis time.
Must compile from source and link as a C library, no package manager install available for the library itself.
MozJPEG is a JPEG compression library created by Mozilla. Its main purpose is to make JPEG image files smaller without making them look worse. It achieves this by applying smarter compression techniques than older standard encoders, so the same image takes up less disk space or downloads faster over the internet, while looking essentially the same to the human eye. The project is built on top of libjpeg-turbo, which is a widely used open-source JPEG library. MozJPEG adds extra compression features on top of it, including a technique called trellis quantization that squeezes out more file size when converting photos from other formats to JPEG, and progressive encoding optimization that can losslessly shrink any existing JPEG file. It also ships with new quality presets tuned for high-resolution screens. Because it follows the same programming interface as the standard libjpeg library, developers can swap it into an existing graphics program without rewriting any integration code. The extra compression features can also be turned off at runtime, in which case the library behaves exactly like libjpeg-turbo. Output files are compatible with all standard JPEG decoders, including every major web browser. MozJPEG is meant to be used as a library that gets embedded inside image editing tools, photo export pipelines, or web services that generate JPEG files. It includes a command-line demo tool, but that is provided for testing rather than everyday use. Developers who want to use it should link their program against the MozJPEG library directly.
MozJPEG is a drop-in JPEG compression library from Mozilla that produces smaller image files than standard encoders with no visible quality loss, ideal for image pipelines that need to serve photos faster over the web.
Mainly C. The stack also includes C, libjpeg-turbo.
Open source under a combination of the IJG, BSD, and zlib licenses, use and embed freely in your own software.
Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.