Huffman Encoding in Python

Creating a lossless compression tool

Aleksa Zatezalo
Level Up Coding
Published in
7 min readDec 12, 2023

--

Source: https://commons.wikimedia.org/wiki/File:Huffman_huff_demo.gif

Introduction

Huffman encoding is an algorithm for lossless compression developed David A. Huffman during his Ph.D in computer science at MIT. The algorithm was created when a professor offered his students the option of taking a final exam or the option of improving a leading compression algorithm. The algorithm performs…

--

--

Interested in the intersection of Cloud, Cyber Security, and Artificial Intelligence. Continually striving towards mastery of my domain. Forever an Apprentice.