Skip to content

aymyo/huffman-coding-website

Repository files navigation

Title: Huffman Online Coding
This project consists of an interactive web tool to learn about Huffman Coding, backed with theory to understand its key concepts.

The website is live and hosted at: https://huffman-coding-online.vercel.app/

How does it work?

To encode a text using the Huffman algorithm, follow these steps:

  1. Type the text to encode on the left input
  2. Click 'Encode'
  3. The text will be analyzed and the frequency table of the symbols will be generated.
  4. The Huffman tree is created from the frequency table
  5. The code alphabet is generated from the tree (to learn how, go to the theory section of the website).
  6. The input text gets encoded using the alphabet, showing the result in the right text area.
  7. Aditional calculations and statistics are computed.

Technology

This is a Next.js project bootstrapped with create-next-app. It is deployed with the Vercel Platform. The following libraries have been used:

Run it locally

Download the repository, and install the dependencies npm install. Afterward, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the project.

Design

You can find a hi-fi mockup design using Figma here.

As a curiosity, David A. Huffman, the author of the algorithm with his name, was also a pioneer in mathematical origami. The decorations of this page are inspired by the diagrams of his models.

Huffman origami diagrams

References

Typography: Inria Sans & Inria Serif

This website was developed as part of the Audio Codification Systems course of the Audiovisual Systems Engineering Degree at Universitat Pompeu Fabra, Barcelona.

License: MIT