Intel® QAT Compress and Verify Tests

For each compress request, Intel® QAT calculates two checksums based on protocol requirements.

For the Deflate algorithm, both Adler-32 and CRC-32 are calculated. This allows the compressed dataset to be delivered as either a GZIP block (based on RFC 1952) or a zlib block (based on RFC 1950), respectively.

For the LZ4 algorithm, XXHash-32 is generated for correct LZ4 blocks and frames, and CRC-32 is also produced.

The production of LZ4 also generates XXHash-32 and CRC-32.

A complete Compress and Verify test on a deflate block can be described using C code notation as shown below:

if ((comp_opr == SUCCESS) && (decomp_opr == SUCCESS) &&
    (comp_textlen == dcomp_textlen) &&
    (comp_crc32 == decomp_crc32)) && (comp_adler32 == decomp_adler32))
{
   CnV = TRUE;
}
else
{
   CnV = FALSE;
}

A complete Compress and Verify test on an LZ4 or LZ4s block can be described as:

if ((comp_opr == SUCCESS) && (decomp_opr == SUCCESS) &&
    (comp_textlen == dcomp_textlen) &&
    (comp_crc32 == decomp_crc32 ) && (comp_xxhash32 == decomp_xxhash32))
{
   CnV = TRUE;
}
else
{
   CnV = FALSE;
}

Where:

Term

Meaning

comp_opr

compression operation

decomp_opr

decompression operation

comp_textlen

size of the incoming cleartext dataset

decomp_textlen

size of the decompressed dataset

comp_crc32

CRC32 of the incoming cleartext dataset

decomp_crc32

CRC32 of the decompressed dataset

comp_adler32

Adler32 of the incoming cleartext dataset

decomp_adler32

Adler32 of the decompressed dataset

comp_xxhash32

XXHash32 of the incoming cleartext dataset

decomp_xxhas32

XXHash32 of the decompressed dataset