Fundamentals 6 min read

How Google’s Jpegli Library Boosts JPEG Compression Efficiency

Google’s newly released Jpegli library offers a backward‑compatible JPEG encoder with up to 35% better compression, adaptive quantization, 10‑bit support and speed comparable to traditional codecs, promising faster web pages and reduced bandwidth without sacrificing image quality.

21CTO
21CTO
21CTO
How Google’s Jpegli Library Boosts JPEG Compression Efficiency

Google recently launched the Jpegli extension library, a new JPEG‑encoding library designed to be faster, more efficient, and visually superior to traditional JPEG.

What is Jpegli?

In 2022 Chrome dropped support for JPEG‑XL to promote its own WebP format, but recognizing JPEG’s continued importance on the web, Google introduced Jpegli as an alternative solution.

The library aims to be faster, more beautiful, and more efficient than traditional JPEG, with the potential to make the internet faster and better.

Google announced that Jpegli was released on April 3 and is available on GitHub, maintaining high backward compatibility while offering enhanced features and up to a 35% compression ratio at high‑quality settings.

According to Google, the encoding speed of Jpegli matches that of traditional methods such as MozJPEG, allowing web developers to integrate it into existing workflows without sacrificing speed, performance, or memory usage.

Jpegli: Efficiency and Compatibility

Jpegli (German‑Austrian for “small JPEG”) is fully compatible with the original JPEG standard and adheres to the traditional 8‑bit configuration, ensuring interoperability with popular libraries like libjpeg‑turbo and MozJPEG.

Key Advanced Techniques

Adaptive quantization: inspired by JPEG‑XL, it adjusts quantization spatially to optimize image quality and reduce file size.

Improved quantization matrix selection: maximizes encoding and decoding quality for both high‑ and low‑quality images.

10‑bit+ encoding: enables higher‑precision color representation, reducing banding artifacts; each component can be encoded with over 10 bits while remaining compatible with 8‑bit viewers.

Speed optimizations: designed for fast, efficient encoding and decoding comparable to traditional JPEG libraries.

Additionally, Jpegli compresses images more effectively than conventional JPEG codecs.

How Jpegli Works

Jpegli reduces noise and improves image quality using new techniques such as adaptive quantization heuristics from JPEG‑XL, refined quantization matrix selection, intermediate result calculations, and the possibility of using more advanced color spaces.

The library provides an interoperable encoder and decoder that conform to the original JPEG standard’s 8‑bit form and remain API/ABI compatible with libjpeg‑turbo and MozJPEG.

When compressing or decompressing images, Jpegli performs more precise, psychovisually effective calculations, resulting in clearer images with fewer observable artifacts.

Conclusion

Can this new format replace the widely used traditional JPEG? Its full compatibility with existing JPEG decoders is a crucial factor for potential adoption.

References: https://github.com/libjxl/libjxl/tree/main/lib/jpegli https://opensource.googleblog.com/2024/04/introducing-jpegli-new-jpeg-coding-library.html https://www.infoworld.com/article/3715021/google-rolls-out-a-new-jpeg-coding-library.html
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

image compressionWeb PerformanceGoogleJPEGencoding libraryJpegli
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.