Skip to content

Anthony-J-Garot/huffman-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Huffman Encoder using python.

Introduction

In 2004, as a lark, I created a Huffman Encoder web page using VBscript/ASP. I found the code on an old CD-R and decided to migrate it to python.

What is Huffman?

It's an encoding mechanism whereby a tree of nodes is formed from a source text, then strings can be encoded using that tree to potentially make the string smaller.

The nodes are typically binary, 1 and 0.

As an example:

Just a simple test.

coverts into

000011111110000001010111111000111001000010011111101010100100101111011010001010110000001

While that seems to be longer, the binary can be converted into characters, so the actual length is the binary stream divided by 8.

Huffman Reference

Features

  • lossless compression

Uses

  • obfuscate a string

About

Huffman encoder written in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published