The compression library used during data compression is zlib. HiRDB uses zlib to compress data into segments of the split compression size specified when the table is defined (default: MIN (32,000 bytes, definition length for the compressed column)). For purposes of managing information about the data before and after compression, HiRDB adds a header area (8 bytes) to each segment of the split compression size (this is separate from the header area added to the compressed data by zlib).
If the data length is the same before and after compression, or the data length is greater after compression than before compression, HiRDB stores the data without compressing it. Because of the header areas that are added, the data size after compression might be greater than the data size before compression. The following figure shows data before and after compression.
Figure 12-44 Data before and after compression