Skip to main content
dw_
Menu
← All work
Systems C/C++

JPEG Encoder(Nov 2025)

Baseline JPEG encoder in C++, from block splitting and DCT to entropy coding, written from scratch

Code

A baseline JPEG encoder written from scratch in C++, stage by stage: block splitting, the discrete cosine transform, quantization, zigzag ordering, and entropy coding with run-length and Huffman stages. No image-compression library does the work - each stage is implemented directly, and an analysis module measures and reports the compression ratios the encoder achieves.