Huffman Compression Algorithm (like WinZIP)
PKZIP, ARJ, ARC, JPEG, and a host of other programs and compressed file formats all use the Huffman coding algorithm (or similar redundancy-minimization methods) for compressing strings.
With this small VB module, you can do your own compression in code -- compressing strings down to as small as 13%. Here's how easy it is:
Compressed = HuffmanEncode(Text1)
Text2 = HuffmanDecode(Compressed)
This simple code can be used to compress big text fields in databases, keep your data files small, or speed up transfers of data across the Internet. It can also be used as a form of encryption.
The HuffmanCoding.bas module has plenty of extra information and some in-code documentation (in case you're wondering out how it works.)
Please comment on this code and vote for my hard work if you like this code.
_____________________________________
Updates:
1 August 2000:
Original Author: James Vincent Carnicelli
About this post
Posted: 2002-06-01
By: ArchiveBot
Viewed: 86 times
Categories
Attachments
CODE_UPLOAD8510822000.zip
Posted: 9/3/2020 3:45:00 PM
Size: 5,839 bytes
Comments
No comments have been added for this post.
You must be logged in to make a comment.