Jump: Search:

Total Visual SourceBook

Total Visual SourceBook CD and Printed Manual

Microsoft Access 2007/2010 Version
is Shipping!

New features in Total Visual SourceBook for Access, Office 2007 and VB6

Supports Access/Office 2010 (32 bit), 2007, 2003, 2002, 2000, and
Visual Basic 6.0!

Also available for:
Access 97/95


View all FMS products for Microsoft AccessAll Our Microsoft Access Products

SourceBook Info:

Why SourceBook?

 

"The code is exactly how I would like to write code and the algorithms used are very efficient and well-documented."

Van T. Dinh, Microsoft MVP

 

 

 

 

 
Royalty free source code library modules for Microsoft Access, VB6, VBA, OfficeRoyalty free source code library modules for Microsoft Access, VB6, VBA, OfficeVBA and VB6 Source Code Library Download the free trial version of Total Visual SourceBook for Microsoft Access, Office, VB6 and VBA
Category: General VBA/VB6 : Encryption and Compression
Description: Encryption and compression operations

Class: CHuffman

Class that implements Huffman compression.

Huffman compression uses character frequencies to compress data. Bit codes are assigned to each character, with shorter bitcodes for more common characters, and longer bitcodes for the less common characters.

Procedure Name

Type

Description

(Declarations) Declarations Declarations and private variables for the CHuffman class
InputFileName Property Sets the name of the input file
OutputFileName Property Sets the name of the output file
BuildTree Private Builds a Huffman tree based on the character frequency of the input data
Compress Method Compresses the input file to the output file
CompressByte Private Compresses a single byte
Decompress Method Decompresses the input file to the output file.
Encode Private Huffman encodes a byte
IntToByte Private This routine does an unsigned conversion from an integer value to a byte value. This correctly handles any integer value.
LongToInt Private This routine does an unsigned conversion from a long value to an integer value
ReadFile Private Reads the specified number of bytes from the file. Using this function significantly increases the speed of processing files. The alternative to using a file buffer is reading a byte at a time from the file.
Shlb Private Shifts a numeric value left the specified number of bits. Left shifting can be defined as a multiplication operation. For the number of bits we want to shift a value to the left, we need to raise two to that power, then multiply the result by our original value.
WriteBit Private Writes to the output file a bit at a time
WriteFinish Private Flushes any remaining data to the output file

Overview of Total Visual SourceBook

The source code in Total Visual SourceBook includes modules and classes for Microsoft Access, Visual Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily add this professionally written, tested, and documented royalty-free code into your applications to simplify your application development efforts.

Additional Resources

Feedback

Contact Us  l   Web questions: Webmaster   l   Copyright © FMS, Inc., Vienna, Virginia
Celebrating our 26th Year of Software Excellence