{"id":16212717,"url":"https://github.com/FARZINzx/Huffman-Coding","last_synced_at":"2025-08-23T17:33:33.357Z","repository":{"id":248356739,"uuid":"815660738","full_name":"FARZINzx/HuffmanCoding","owner":"FARZINzx","description":"This project implements Huffman Encoding and Decoding in Java, complete with a graphical user interface (GUI) to visualize the Huffman Tree, Huffman Codes, character frequencies, encoded text, and decoded text. The application also supports file upload and saving encoded and decoded text.","archived":false,"fork":false,"pushed_at":"2024-07-14T09:35:25.000Z","size":101705,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-03T17:43:06.549Z","etag":null,"topics":["huffman-algorithm","huffman-coding","huffman-compression-algorithm","huffman-decoder","huffman-encoder","java","java-swing-applications"],"latest_commit_sha":null,"homepage":"","language":"Java","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/FARZINzx.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}},"created_at":"2024-06-15T18:52:34.000Z","updated_at":"2024-10-31T06:08:38.000Z","dependencies_parsed_at":"2024-07-14T10:22:38.785Z","dependency_job_id":null,"html_url":"https://github.com/FARZINzx/HuffmanCoding","commit_stats":null,"previous_names":["farzinzx/huffmancoding"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FARZINzx%2FHuffmanCoding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FARZINzx%2FHuffmanCoding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FARZINzx%2FHuffmanCoding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FARZINzx%2FHuffmanCoding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FARZINzx","download_url":"https://codeload.github.com/FARZINzx/HuffmanCoding/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230718569,"owners_count":18270056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["huffman-algorithm","huffman-coding","huffman-compression-algorithm","huffman-decoder","huffman-encoder","java","java-swing-applications"],"created_at":"2024-10-10T10:53:22.017Z","updated_at":"2025-08-23T17:33:33.012Z","avatar_url":"https://github.com/FARZINzx.png","language":"Java","readme":"\u003ch1\u003eHuffman Encoding and Decoding in Java\u003c/h1\u003e\n\u003cbr/\u003e\n\u003cp\u003eThis project implements Huffman Encoding and Decoding in Java, complete with a graphical user interface (GUI) to visualize the Huffman Tree, Huffman Codes, character frequencies, encoded text, and decoded text. The application also supports file upload and saving encoded and decoded text.\u003c/p\u003e\n\n\u003ch3\u003eFeatures\u003c/h3\u003e\n\u003col\u003e\n        \u003cli\u003eFile Upload: Upload a text file to be encoded.\u003c/li\u003e\n        \u003cli\u003eCharacter Frequency Calculation: Analyze the uploaded text to calculate the frequency of each character.\u003c/li\u003e\n        \u003cli\u003eHuffman Tree Construction: Build a Huffman Tree based on the character frequencies.\u003c/li\u003e\n        \u003cli\u003eHuffman Code Generation: Generate Huffman codes for each character from the Huffman Tree.\u003c/li\u003e\n        \u003cli\u003eEncoding: Encode the text using the generated Huffman codes.\u003c/li\u003e\n        \u003cli\u003eDecoding: Decode the encoded text back to its original form using the Huffman Tree.\u003c/li\u003e\n        \u003cli\u003eFile Saving: Save the encoded text, Huffman codes, and decoded text to files.\u003c/li\u003e\n        \u003cli\u003eGraphical Display: Display the character frequencies, Huffman Tree, Huffman codes, encoded text, and decoded text in a GUI.\u003c/li\u003e\n    \u003c/ol\u003e\n    \u003ch2\u003eHow It Works\u003c/h2\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003cstrong\u003eFileUploader\u003c/strong\u003e: Provides functionality to select and upload a text file.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eTextAnalyzer\u003c/strong\u003e: Analyzes the uploaded text to calculate character frequencies.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eHuffmanNode\u003c/strong\u003e: Represents a node in the Huffman Tree.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eHuffmanTreeBuilder\u003c/strong\u003e: Builds the Huffman Tree from the character frequencies.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eHuffmanCode\u003c/strong\u003e: Generates Huffman codes from the Huffman Tree and encodes the text.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eHuffmanDecoder\u003c/strong\u003e: Decodes the encoded text back to the original text using the Huffman Tree.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eFileSaver\u003c/strong\u003e: Saves the encoded text, Huffman codes, and decoded text to files.\u003c/li\u003e\n        \u003cli\u003e\u003cstrong\u003eGUI Components\u003c/strong\u003e: Various panels (HuffmanTreePanel, HuffmanTablePanel, EncodedTextPanel, FrequencyPanel, DecodedTextPanel) to display the data.\u003c/li\u003e\n    \u003c/ul\u003e\n      \u003ch2\u003eGetting Started\u003c/h2\u003e\n    \u003ch3\u003ePrerequisites\u003c/h3\u003e\n    \u003cp\u003eJava Development Kit (JDK) 8 or higher\u003c/p\u003e\n    \u003ch3\u003eInstalling\u003c/h3\u003e\n    \u003cp\u003eClone the repository:\u003c/p\u003e\n    \u003cpre\u003e\u003ccode\u003egit clone https://github.com/yourusername/huffman-encoding.git\ncd huffman-encoding\n\u003c/code\u003e\u003c/pre\u003e\n    \u003cp\u003eOpen the project in your IDE and build it.\u003c/p\u003e\n     \u003ch2\u003eUsage\u003c/h2\u003e\n    \u003col\u003e\n        \u003cli\u003eRun the \u003ccode\u003eHuffmanEncodingApplication\u003c/code\u003e main class.\u003c/li\u003e\n          \u003cpre\u003e\u003ccode\u003eJavac HuffmanEncodingApplication.java\nJava HuffmanEncodingApplication\u003c/code\u003e  \u003c/pre\u003e\n        \u003cli\u003eUpload a text file when prompted.\u003c/li\u003e\n        \u003cli\u003eThe application will display the character frequencies, Huffman Tree, Huffman codes, encoded text, and decoded text in separate tabs.\u003c/li\u003e\n        \u003cli\u003eSave the encoded text, Huffman codes, and decoded text using the file save options.\u003c/li\u003e\n    \u003c/ol\u003e\n    \u003ch2\u003eClasses and Methods\u003c/h2\u003e\n    \u003ch3\u003eFileUploader\u003c/h3\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003ccode\u003euploadFile()\u003c/code\u003e: Opens a file chooser to select a text file.\u003c/li\u003e\n        \u003cli\u003e\u003ccode\u003ereadFile(File file)\u003c/code\u003e: Reads the contents of a file and returns it as a string.\u003c/li\u003e\n    \u003c/ul\u003e\n    \u003ch3\u003eTextAnalyzer\u003c/h3\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003ccode\u003eanalyzeText(String text)\u003c/code\u003e: Analyzes the text to calculate character frequencies.\u003c/li\u003e\n    \u003c/ul\u003e\n    \u003ch3\u003eHuffmanNode\u003c/h3\u003e\n    \u003cp\u003eRepresents a node in the Huffman Tree.\u003c/p\u003e\n    \u003ch3\u003eHuffmanTreeBuilder\u003c/h3\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003ccode\u003ebuildTree(Map\u0026lt;Character, Integer\u0026gt; frequencyMap)\u003c/code\u003e: Builds the Huffman Tree from the character frequencies.\u003c/li\u003e\n    \u003c/ul\u003e\n    \u003ch3\u003eHuffmanCode\u003c/h3\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003ccode\u003egenerateCodes(HuffmanNode root)\u003c/code\u003e: Generates Huffman codes from the Huffman Tree.\u003c/li\u003e\n        \u003cli\u003e\u003ccode\u003eencodeText(String text, Map\u0026lt;Character, String\u0026gt; huffmanCodes)\u003c/code\u003e: Encodes the text using the Huffman codes.\u003c/li\u003e\n    \u003c/ul\u003e\n    \u003ch3\u003eHuffmanDecoder\u003c/h3\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003ccode\u003edecodeText(String encodedText, HuffmanNode root)\u003c/code\u003e: Decodes the encoded text back to the original text using the Huffman Tree.\u003c/li\u003e\n    \u003c/ul\u003e\n    \u003ch3\u003eFileSaver\u003c/h3\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003ccode\u003esaveEncodedText(String encodedText)\u003c/code\u003e: Saves the encoded text to a file.\u003c/li\u003e\n        \u003cli\u003e\u003ccode\u003esaveHuffmanCodes(Map\u0026lt;Character, String\u0026gt; huffmanCodes)\u003c/code\u003e: Saves the Huffman codes to a file.\u003c/li\u003e\n        \u003cli\u003e\u003ccode\u003esaveDecodedText(String decodedText)\u003c/code\u003e: Saves the decoded text to a file.\u003c/li\u003e\n    \u003c/ul\u003e\n    \u003ch3\u003eGUI Components\u003c/h3\u003e\n    \u003cul\u003e\n        \u003cli\u003e\u003ccode\u003eFrequencyPanel\u003c/code\u003e: Displays character frequencies.\u003c/li\u003e\n        \u003cli\u003e\u003ccode\u003eHuffmanTreePanel\u003c/code\u003e: Displays the Huffman Tree.\u003c/li\u003e\n        \u003cli\u003e\u003ccode\u003eHuffmanTablePanel\u003c/code\u003e: Displays Huffman codes.\u003c/li\u003e\n        \u003cli\u003e\u003ccode\u003eEncodedTextPanel\u003c/code\u003e: Displays the encoded text.\u003c/li\u003e\n        \u003cli\u003e\u003ccode\u003eDecodedTextPanel\u003c/code\u003e: Displays the decoded text.\u003c/li\u003e\n    \u003c/ul\u003e\n    \u003ch2\u003eContributing\u003c/h2\u003e\n    \u003cp\u003eContributions are welcome! If you have suggestions for improvements, please submit a pull request or open an issue.\u003c/p\u003e\n    \u003cp\u003eMade with ❤️ by \u003cb\u003eFARZINzx\u003c/b\u003e\u003c/p\u003e\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFARZINzx%2FHuffman-Coding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFARZINzx%2FHuffman-Coding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFARZINzx%2FHuffman-Coding/lists"}