GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nrutkowski1/HuffmanEncoding: Compress and decompress a file using the Huffman encoding technique

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 
Tree.py
Tree.py
 
 
main.py
main.py
 
 

Repository files navigation

HuffmanEncoding

Compress and decompress a file using the Huffman encoding technique

Begin by initializing a new Huffman object by h = Huffman()

Building the Tree

To build the tree call h.building_tree("your input") "your input" must be a string. A binary tree will then be built from the input string using the Huffman encoding technique

Viewing the Tree

after building the tree it can be viewed by calling h.view_tree(h.get_data())

Encoding

To encode a file and compress it call h.encode('file to encode', 'output file') The 'file to encode' should be a document containing text. The 'output file' should be a binary file. An example input would be 'output.bin'

Decoding

To decode and decompress the file call h.decode('file to decode', 'output file') The 'file to decode' should be a compressed binary file such as previously mentioned 'output.bin' The output file should now be a text document an example being 'output.txt'

About

Compress and decompress a file using the Huffman encoding technique

Topics

binary-treescompressioncompression-algorithmdecompressiondecompression-algorithmhuffmanhuffman-algorithmhuffman-codinghuffman-coding-algorithmhuffman-compression-algorithmhuffman-compressorhuffman-decoderhuffman-encoderhuffman-treehuffman-writerpythonpython-scriptpython3

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.