Giter Site home page Giter Site logo

rusty-classic-huff's Introduction

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%

rusty-classic-huff's People

Contributors

eagletw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.