Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JPEG Compression from Scratch

A from-scratch implementation of JPEG-style image compression in Python.

Pipeline

Image → RGB→Y → Pad → DCT → Quantize → Zigzag → RLE → Huffman → .bin

.bin → Huffman decode → de-zigzag → Dequantize → IDCT → Crop → Image

Usage

pip install -r requirements.txt

encode

python encoder.py input.jpg output.bin

decode

python decoder.py output.bin decoded.png

File format (.bin)

[6B magic][4B header_len][4B padding][JSON codebooks][bitstream]

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages