next up previous contents
Next: A.7 VBS Data Types Up: A Vienna Base System Previous: Timeouts

A.6 Data Compression

The data compression part of the VBS library allows to compress and uncompress data by using callback functions for input and output. This generic approach allows to manipulate data from any source to any destination without recoding the compression machine. The first callback parameter is a pointer to an internal buffer used for the I/O operation, the second is the user specified client data and the third the size of the buffer to read or write. The callback should return the number of bytes processed, e.g., how much data was read from or written to a file. Different algorithm for data compression can be selected:

  1. run length encoding, either for bytes, 32bit integer or double floating point values,
  2. inflate from the GNU zip program,
  3. byte pair encoding.
The compression type is stored with the data and used for selecting the right algorithm during decompression.

A compression program vcpr is generated within the VBS project. It is used to create compressed patch data files for patch releases (see Section 6.5).



IUE WWW server
Fri Jan 3 17:00:13 MET 1997