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: CLZ

Class that implements Lempel-Ziv compression.

LZ compression, also known as sliding window compression, uses redundancy to compress data. As input data is read, a dictionary of previous data is kept in memory. If a string of characters in the input data matches an entry in the dictionary, a code pointing to the dictionary entry is written to the output. If a match is not found in the dictionary the plain character is sent to the output.

Procedure Name

Type

Description

(Declarations) Declarations Declarations and private variables for the CLZ class
InputFileName Property Sets the name of the input file
OutputFileName Property Gets the name of the output file
BitSetByte Private Sets a bit in a byte variable
BufLength Private Returns the length of an entry
BufPosition Private Returns the window position of an entry
Compress Method Compresses the input file to the output file
CompressionInitialize Private Initializes the module variables for the compression and decompression routines
CompressString Method Compresses an input string
dblToLong Private Performs an unsigned conversion from a Double value to a Long value. This function correctly handles doubles greater than 2,147,483,647 and less than or equal to 4,294,967,295.
Decompress Method Decompresses the input file to the output file
DecompressString Method Decompresses a string that was previously compressed with the CompressString method of this class
DeletePosition Private Removes a character from the window
FindMatch Private Searches for a match in the window
HiByte Private Returns the high byte of the passed integer
HiWord Private Returns the high integer of the passed long
InsertPosition Private Insert a character into the window
IntToByte Private Perform an unsigned conversion from an integer value to a byte. This handles any integer value.
IntToLong Private This routine converts an integer value to a long value, treating the integer as unsigned. For example, performing the following assignment lngNumber = -1 assigns -1 to the variable lngNumber. However, This assignment lngNumber = IntToLong(-1) assigns 65,535 to lngNumber.
LoByte Private Returns the low byte of the passed integer
LongToInt Private This routine does an unsigned conversion from a long value to an integer value.
LoWord Private Returns the low integer of the passed long
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.
Shli 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.
Shll 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.
Shri Private Shifts a Long value right the selected number of places. Right shifting can be defined as a division operation. For the number of bits we want to shift a value to the right, we need to raise two to that power, then our original value by the result
WriteBufferByte Private Writes a single byte to the output buffer
WriteBufferEntry Private Writes a window entry to the output buffer
WriteBufferFinish Private Flushes any remaining data to the output buffer
WriteByte Private Writes a single byte to the output file
WriteEntry Private Writes a window entry to the output file
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