COMPR_PIINFO data structure
This structure is used by the plug-in library to describe itself to Db2®.
This
structure is allocated and initialized by Db2, and the key fields
are filled in by the plug-in library on the InitCompression API call.
API and data structure syntax
struct COMPR_PIINFO {
char tag[16];
db2Uint32 version;
db2Uint32 size;
db2Uint32 useCRC;
db2Uint32 useGran;
db2Uint32 useAllBlocks;
db2Uint32 savedBlockSize;
};COMPR_PIINFO data structure parameters
- tag
- Used as an eye catcher for the structure. (It is set by Db2.) This is always set
to the string
"COMPR_PIINFO \0". - version
- Indicates which version of the structure is being used so APIs can indicate the presence of
additional fields. Currently, the version is 1.
(It is set by Db2.) In the future there may be more fields added to this structure.
- size
- Indicates the size of the COMPR_PIINFO structure (in bytes). (It is set by Db2.)
- useCRC
- Db2 allows
compression plug-ins to use a 32-bit CRC or checksum value to validate the integrity of the data
being compressed and decompressed.
If the library uses such a check, it will set this field to 1. Otherwise, it will set the field to 0.
- useGran
- If the compression routine is able to compress data in arbitrarily-sized
increments, the library will set this field to 1.
If the compression routine compresses data only in byte-sized increments,
the library will set this field to 0. See the description
of the srcGran parameter of Compress API for
details of the implications of setting this indicator.
For restore operations, this parameter is ignored.
- useAllBlocks
- Specifies whether Db2 should back up a compressed block of data that is larger than the original uncompressed block. By default, Db2 will store data uncompressed if the compressed version is larger, but under some circumstances the plug-in library will want to have the compressed data backed up anyway. If Db2 is to save the compressed version of the data for all blocks, the library will set this value to 1. If Db2 is to save the compressed version of the data only when it is smaller than the original data, the library will set this value to 0. For restore operations, this field is ignored.
- savedBlockSize
- Db2 allows the plug-in library to save an arbitrary block of data in the backup image. If such a block of data is to be saved with a particular backup, the library will set this parameter to the size of the block to be allocated for this data. (The actual data will be passed to Db2 on a subsequent API call.) If no data is to be saved, the plug-in library will set this parameter to zero. For restore operations, this parameter is ignored.