{"id":29224638,"url":"https://github.com/kglikith/huffman-and-lzw-compression-visualization","last_synced_at":"2026-04-17T08:02:03.627Z","repository":{"id":300563645,"uuid":"979529267","full_name":"KGLikith/Huffman-and-lzw-compression-visualization","owner":"KGLikith","description":"Explore and understand how lossless text compression works with step-by-step visualizations built using Next.js, React D3 Tree, and Tailwind CSS.","archived":false,"fork":false,"pushed_at":"2025-06-22T12:14:51.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-03T06:07:29.618Z","etag":null,"topics":["framer-motion","nextjs","react-d3-tree","shadcn-ui","typscript"],"latest_commit_sha":null,"homepage":"https://huffman-and-lzw-visualizer.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KGLikith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-07T16:49:13.000Z","updated_at":"2025-06-23T08:44:28.000Z","dependencies_parsed_at":"2025-06-22T12:33:15.462Z","dependency_job_id":"21ed5cb1-5d7f-4826-a899-32fdf5ead3c0","html_url":"https://github.com/KGLikith/Huffman-and-lzw-compression-visualization","commit_stats":null,"previous_names":["kglikith/huffman-and-lzw-compression-visualization"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KGLikith/Huffman-and-lzw-compression-visualization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KGLikith%2FHuffman-and-lzw-compression-visualization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KGLikith%2FHuffman-and-lzw-compression-visualization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KGLikith%2FHuffman-and-lzw-compression-visualization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KGLikith%2FHuffman-and-lzw-compression-visualization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KGLikith","download_url":"https://codeload.github.com/KGLikith/Huffman-and-lzw-compression-visualization/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KGLikith%2FHuffman-and-lzw-compression-visualization/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31920518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["framer-motion","nextjs","react-d3-tree","shadcn-ui","typscript"],"created_at":"2025-07-03T06:07:28.146Z","updated_at":"2026-04-17T08:02:03.557Z","avatar_url":"https://github.com/KGLikith.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Huffman \u0026 LZW Compression Visualizer\n\nA sleek, interactive web application to **visualize how Huffman Coding and LZW Compression algorithms work** step-by-step — built with **Next.js 15**, **Tailwind CSS**, **React D3 Tree**, and smooth animations using **Framer Motion**.\n\n---\n\n## Features\n\n### Compression Algorithm Visualization\n- 📊 **Huffman Coding Tree** step-by-step construction\n- 🧱 **LZW dictionary build-up** with real-time updates\n- 🧠 Interactive encoding/decoding processes with tooltips and transitions\n\n### Modern UI \u0026 UX\n- 🌙 Theme support via `next-themes`(Only dark mode supported for now)\n- 🧩 Responsive design using Tailwind CSS + Shadcn UI\n- 📈 Dynamic tree rendering via `react-d3-tree`\n- 🎬 Smooth animations with `framer-motion`\n\n### 🛠Dev Tools\n- TypeScript-powered\n\n---\n\n## Tech Stack\n\n| Tech                 | Role                                      |\n|----------------------|-------------------------------------------|\n| **Next.js**          | React-based app framework                 |\n| **Tailwind CSS**     | Utility-first styling                     |\n| **Shadcn UI**        | Accessible UI primitives                  |\n| **Framer Motion**    | Animation library                         |\n| **React D3 Tree**    | Tree rendering for Huffman visualization  |\n| **Recharts**         | Graphical representation (pending)        |\n| **TypeScript**       | Type safety and dev ergonomics            |\n\n---\n\n## Compression Algorithms\n\n### Huffman Coding\n\n**Huffman Coding** is a **lossless data compression algorithm** based on character frequencies. It builds a binary tree (Huffman Tree) where:\n- Characters with higher frequencies have **shorter binary codes**\n- Characters with lower frequencies have **longer binary codes**\n\n#### Features of Huffman Coding\n- 📊 **Frequency-Based**: Uses the frequency of each character to build an optimal prefix tree\n- 🌲 **Binary Tree Construction**: Dynamically builds a tree where each leaf is a character\n- 🔗 **Prefix-Free Codes**: No code is a prefix of another; ensures unambiguous decoding\n- 💡 **Greedy Algorithm**: Always combines the two least frequent nodes\n- 🚀 **Efficient for texts with skewed frequency distribution**\n\n### Lempel–Ziv–Welch (LZW) Compression\n\n**LZW** is a **dictionary-based** lossless compression algorithm. It works by:\n- Scanning sequences of characters\n- Storing new sequences in a **dynamic dictionary**\n- Replacing repeated sequences with **dictionary indexes**\n\n#### Features of LZW Compression\n- 📘 **No Need to Transmit Dictionary**: Both encoder and decoder build it identically on the fly\n- 🧱 **Efficient for Repeating Patterns**: Great for structured, repetitive data (e.g., XML, logs)\n- 🔄 **Dynamic Dictionary Building**: Grows during encoding, allowing for efficient handling of long strings\n\n\n## Getting Started\n\n1. **Clone the repo**\n   ```bash\n   git clone https://github.com/KGLikith/huffman-lzw-visualizer.git\n   cd huffman-lzw-visualizer\n   npm i\n   npm run build\n   npm start\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkglikith%2Fhuffman-and-lzw-compression-visualization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkglikith%2Fhuffman-and-lzw-compression-visualization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkglikith%2Fhuffman-and-lzw-compression-visualization/lists"}