# Lossless Compression

- **Canonical URL:** https://getaimath.com/dictionary/lossless-compression/
- **Topics:** [Quantization & Model Compression](https://getaimath.com/dictionary/category/quantization-and-model-compression/)
- **Last updated:** 2026-11-25

## What is Lossless Compression?

**In one sentence:** Lossless compression makes data smaller in a way that can be perfectly reversed, with no detail lost.

ZIP files are lossless: unzip them and you get exactly the original. For AI models, lossless methods save less space than quantization but keep every number exact.

![Quantization: Vacuum-Packing a Giant AI into a Carry-On Bag — Simple cartoon showing a huge 16 GB AI model with long fussy decimals (3.14159265) squeezed by a vacuum-seal press into a compact 4 GB model with rounded numbers (3.1) that fits on a laptop.](https://getaimath.com/diagrams/quantization-and-model-compression.png)
*Napkin Diagram (Quantization & Model Compression): By rounding long fussy decimals to neat short numbers, quantization shrinks a model about 4× with only a small loss in smarts.*

## What is an example of Lossless Compression?

Zipping a model file and unzipping it later gives back the identical weights.

## Why does Lossless Compression matter?

It is used when exactness matters, such as storing or sending original weights.

## Related Concepts

- [Lossy Compression](https://getaimath.com/dictionary/lossy-compression/): Lossy compression makes data smaller by throwing away some detail that cannot be perfectly recovered.
- [Quantization Trade-off](https://getaimath.com/dictionary/quantization-trade-off/): The quantization trade-off is the balance between making a model smaller and faster and keeping its answers accurate.
- [Block-wise Quantization](https://getaimath.com/dictionary/block-wise-quantization/): Block-wise quantization divides weights into fixed-size blocks, each with its own scale, much like group-wise quantization.
- [Compression Ratio](https://getaimath.com/dictionary/compression-ratio/): The compression ratio compares a model's original size to its compressed size.
- [Group-wise Quantization](https://getaimath.com/dictionary/group-wise-quantization/): Group-wise quantization splits weights into small groups, like 32 or 128 numbers, and gives each group its own scale.
- [Per-Tensor Quantization](https://getaimath.com/dictionary/per-tensor-quantization/): Per-tensor quantization uses one single scale for an entire block of weights, called a tensor.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/lossless-compression/)
