Skip to content

The code is for classic Huffman compression with some raw data images. (ie. Baboon and lena in raw, halftone and binary color)

Notifications You must be signed in to change notification settings

EagleTw/rusty-classic-huff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rusty-classic-huff

About

The code is for classic huffman compression with some raw data images.
(ie. Baboon and lena in raw,halftone and binary color)

Usage

  • Clone directory to local
$ git clone https://github.com/yppan/rusty-huffman-unicode/ && cd rusty-huffman-unicode/
  • Encode(Compress):
$ cargo run -- -c <FILE>
  • Decode(Extract):
$ cargo run -- -d <FILE>

This will not work now and will be explained below!

Future work

Due to the lack of the time, now I only focus on the experiment of different ways of huffman coding. Therefore Decoder is yet not fully workable

The basic decoder concept is the same as my previous project: rusty-huffman-unicode" You can check detail implementation there if you want.

Experiment statistic

Baboon

Baboon

Image(256*256) Entropy(bit) Before(byte) After(byte) -without header Header(byte) Compression Rate
baboon_b 0.96909 65536 8197 4 87.49%
baboon_halftone 0.96136 65536 8197 4 87.49%
baboon_raw 7.24065 65536 59939 146 8.54%

Lena

Lena

Image(256*256) Entropy(bit) Before(byte) After(byte) -without header Header(byte) Compression Rate
lena_b 0.96968 65536 8197 4 87.49%
baboon_halftone 0.83681 65536 8197 4 87.49%
baboon_raw 7.59536 65536 62932 214 3.97%

About

The code is for classic Huffman compression with some raw data images. (ie. Baboon and lena in raw, halftone and binary color)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages