#The compression of encoded data such as pictures and texts is implemented according to the principle of the Huffman tree. Programming language: C++. Implementation principle compression process: 1. First construct the Huffman tree to obtain the prefix encoding corresponding to each character; 2. Write the compression information such as characters and their corresponding prefix encoding into the compressed document for easy decoding; 3. Scan the text and text The characters in the characters are converted into 0, 1 strings, and each eight-bit, that is, a character corresponding to one byte is stored in the compressed file. Note: If the last stored 0, 1 string is less than eight digits, then the end is filled with 0, and then the complemented digit information is written to the compressed file. Decompression process: 1. Read the compressed information; 2. Scan the compressed text, convert each character into 0, 1 string, match the prefix encoding of the character, and convert it into the original file.
suyibjut/hafuman_encryption
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
About
The compression of encoded data such as pictures and texts is implemented according to the principle of the Huffman tree. Programming language: C++.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published