GitXplorerGitXplorer
t

Huffman-Coding

public
2 stars
1 forks
0 issues

Commits

List of commits on branch master.
Verified
7a34e9cc03523b0e8e5f69e8e21f324d9889fa83

Update README.md

tthesofakillers committed 5 years ago
Unverified
11c189407ada30fc1076b863253387e5f23eeec2

fix typo

tthesofakillers committed 6 years ago
Unverified
c38f1f071bb829575c37536fa795913dc9443a4d

populate readme

tthesofakillers committed 6 years ago
Unverified
4bb40e5156b1ab8a7fac6cd073b9d1bcd8069528

initial commit

tthesofakillers committed 6 years ago

README

The README file for this repository.

Huffman Coding

Originally made for my University's Department of Computer Science's course Software Methodologies under the sub-module Digital Communications, as part of the coursework in 2017/2018.

This repository contains an implementation of Huffman Coding for .txt files.

I have included the .txt files I have tested my implementation on in the same directory for ease of use, since the script and the files you wish to encode are to be in the same directory for it to work smoothly.

Requirements

This project was made utilizing Python 3.6 and should work with all 3.X versions.

In addition, please ensure that the following modules are installed:

Instructions

Encoding

To encode a file, please:

  1. Open a console window and navigate to a directory containing huffman.py and the plain text document file you wish to encode using the cd command
  2. type python huffman.py e filename.txt where filename.txt is to be replaced by the name of the file you wish to encode.

A file filename.hc should appear in the same directory, ready for decoding

Decoding

To decode a file, please:

  1. Open a console window and navigate to a directory containing huffman.py and the .hc file you wish to decode located using the cd command. Ensure that the .hc file was in fact created by huffman.py and not some other script.
  2. type python huffman.py d filename.hc where filename.hc is to be replaced by the name of the file you wish to encode.

A file filename decoded.txt should appear in the directory.