Skip to content

k3shii/huffman_encoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Huffman Encoder

Overview

This Python script implements Huffman coding, a method for lossless data compression. Huffman coding assigns variable-length codes to input characters, with shorter codes assigned to more frequent characters.

Features

  • Huffman tree construction for efficient encoding and decoding.
  • Calculation of average code length, entropy, and efficiency.
  • Interactive input to analyze Huffman coding for any given text.

Preview

image

Requirements

  • Python 3.x
  • NumPy (for calculating entropy)

Usage

  1. Clone the repository:
git clone https://github.com/k3shii/huffman_encoder.git
  1. Installation:
pip install -r requirements. txt
  1. Navigate to the project directory:
cd huffman_encoder
  1. Run the script:
python huffman.py

About

Python implementation of Huffman coding, a popular technique for lossless data compression. Huffman coding assigns variable-length codes to input characters based on their frequencies, resulting in efficient encoding and decoding processes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages