Box and Unbox your file through Huffman Coding Algorithm and SHA256 Hashing

Get Started


Download

Cross Platform Run From Jar

  • git clone https://github.com/boxianglin/BoxDBox.git
  • JDK 11 or above installed https://www.oracle.com/java/technologies/downloads/
  • double click /Product/BoxDBox.jar

MAC dmg Available

  • Clicke here to download
  • open BoxDBox_Installler_macos_1.0.dmg and copy BoxDBox-Mac.app to your chosen directory
  • doubly click BoxDBox-Mac.app

Windows Installation Package

  • Not Available Yet

Demo

Watch the video below

Software Design

BoxDBox uses Huffman Coding Algorithm and SHA256 Hashing to box and unbox your file. In a high level, BoxDBox read bytes of your file and construct the huffman tree where the huffman tree is constructed in a greedy mechanism such that the most frequent byte should be positioned as a leaf node with the shortest path from the root. In this design, the Huffman Tree is binary. The compressed bits of a byte data is derived from the path of root to the leaf node, whereof the left traversal consider an append of '0' and right traversal consider an append of '1'.

To track of a original byte with its compressed binary representation, we uses a HashMap<Byte,String> in which we called it a Huffman Table. Finally, by referring to Huffman Table with the original byte array we construct a Huffman Code String, a string with concatenations of all compressed byte binary representation.

We serialize a packet that consists of Huffman Code String, Huffman Table, and a SHA256 hashed secret key to the .box file. To unbox a file, we went through a validation phase. In validation phase, we check the validity deserialization of packet and verify the secret key by a hashing match.

Architecture Diagram

Graphical User Interfaces