xilHuffmanKernel - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English
#include "zlib_huffman_enc_mm.hpp"
void xilHuffmanKernel (
    xf::compression::uintMemWidth_t* in,
    uint32_t* lit_freq,
    uint32_t* dist_freq,
    xf::compression::uintMemWidth_t* out,
    uint32_t* in_block_size,
    uint32_t* compressd_size,
    uint32_t block_size_in_kb,
    uint32_t input_size
    )

Huffman kernel top function. This is an initial version of Huffman Kernel which does block based bit packing process. It uses dynamic huffman codes and bit lengths to encode the LZ77 (Byte Compressed Data) output. This version operates on 1MB block data per engine as this is suitable for use cases where raw data is over >100MB and compression ratio is over 2.5x in order to achieve best throughput. This can be further optimized to achieve better throughput for smaller file usecase.

Parameters:

in input stream
out output stream
in_block_size input block size
compressd_size output compressed size
dyn_litmtree_codes input literal and match length codes
dyn_distree_codes input distance codes
dyn_bitlentree_codes input bit-length codes
dyn_litmtree_blen input literal and match length bit length data
dyn_dtree_blen input distance bit length data
dyn_bitlentree_blen input bit-length of bit length data
dyn_max_codes input maximum codes
block_size_in_kb input block size in bytes
input_size input data size