Skip to content

tranquoclongt1/doan_Multimedia_computing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Project: Multimedia Computing

HUFFMAN CODING

How to run:

  • python HuffmanCompress.py InputFile OutputFile

  • python HuffmanDecompress.py InputFile OutputFile

Ex: python HuffmanCompress test1.txt compress1.txt


Project Struct:

multi_1

And let's see what we've defined for a tree inneed:

capture


Theory:

1. Huffmancoding:

Ref: https://en.wikipedia.org/wiki/Huffman_coding

  • Huffman code tree: contain Node, InternalNode, and Leaf, represent a Huffman code tree. The leaves represent symbols. The path to a leaf represents the bit string of its Huffman code.

2. Canoncial Code:

Ref: https://en.wikipedia.org/wiki/Canonical_Huffman_code

  • Converts an arbitrary CodeTree to a canonical code.

Reference:

  1. IO Stream solution:

About

Đồ án Multimedia Computing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages