# pixo Documentation
Welcome to the comprehensive documentation for **pixo**, a minimal-dependency, high-performance image compression library written in Rust.
This documentation is designed to be accessible to developers who may not be familiar with the low-level details of image compression. We use clear explanations, visual examples, and step-by-step breakdowns to help you understand not just _how_ these algorithms work, but _why_ they work.
**API docs (with embedded guides):** build locally with `cargo doc --all-features --open` or view on docs.rs once published (`docs.rs/pixo`).
## Documentation Guide
### Getting Started
| [Introduction to Image Compression](./introduction-to-image-compression.md) | Start here! Understand why we need image compression and the fundamental approaches |
| [Introduction to Rust](./introduction-to-rust.md) | Learn Rust through compression code examples from this library |
### Core Compression Algorithms
| [Huffman Coding](./huffman-coding.md) | Learn how variable-length codes achieve optimal compression |
| [LZ77 Compression](./lz77-compression.md) | Understand dictionary-based compression with sliding windows |
| [DEFLATE Algorithm](./deflate.md) | See how LZ77 and Huffman combine for powerful compression |
### Image Format Specifics
| [PNG Encoding](./png-encoding.md) | Lossless image compression with predictive filtering |
| [JPEG Encoding](./jpeg-encoding.md) | Lossy compression pipeline overview |
| [Decoding](./decoding.md) | The decoder side of the codec: PNG and JPEG pipelines |
| [Discrete Cosine Transform (DCT)](./dct.md) | The mathematical heart of JPEG compression |
| [JPEG Quantization](./quantization.md) | How JPEG achieves its dramatic compression ratios |
### Performance & Implementation
| [Performance Optimization](./performance-optimization.md) | Techniques for high-performance compression code |
| [Compression Evolution](./compression-evolution.md) | History and philosophy of compression improvements |
| [Benchmarks](../benches/BENCHMARKS.md) | Comprehensive comparison with oxipng, mozjpeg, and other tools |
## Learning Path
If you're new to image compression, we recommend reading the documents in this order:
1. **[Introduction to Image Compression](./introduction-to-image-compression.md)** - Foundational concepts
2. **[Introduction to Rust](./introduction-to-rust.md)** - Understand the implementation language
3. **[Huffman Coding](./huffman-coding.md)** - Core entropy coding technique
4. **[LZ77 Compression](./lz77-compression.md)** - Dictionary compression basics
5. **[DEFLATE Algorithm](./deflate.md)** - Combining the above for PNG
6. **[PNG Encoding](./png-encoding.md)** - Complete lossless pipeline
7. **[Discrete Cosine Transform](./dct.md)** - Mathematical foundations for JPEG
8. **[JPEG Quantization](./quantization.md)** - Controlled information loss
9. **[JPEG Encoding](./jpeg-encoding.md)** - Complete lossy pipeline
10. **[Decoding](./decoding.md)** - The other half of the codec
11. **[Performance Optimization](./performance-optimization.md)** - Making it all fast
12. **[Compression Evolution](./compression-evolution.md)** - History and advanced techniques
## Implementation Details
Each document includes:
- **Conceptual explanations** with real-world analogies
- **Visual examples** and diagrams (in ASCII art for portability)
- **Worked examples** with actual numbers
- **Common pitfalls** to help you avoid mistakes
- **Code references** to the relevant implementation in this library
- **RFC references** for the definitive specifications