class xf::compression::xfLz4

#include "lz4.hpp"

Overview

xfLz4 class.


Methods

init

int init (
    const std::string& binaryFile,
    uint8_t flow,
    uint32_t block_size_kb
    )

Initialize the class object.

Parameters:

binaryFile file to be read

release

int release ()

release

compress

uint64_t compress (
    uint8_t* in,
    uint8_t* out,
    uint64_t actual_size,
    uint32_t host_buffer_size,
    bool file_list_flag
    )

This module does the sequential execution of compression where all the I/O operations and kernel execution are done one after another in sequential order.

Parameters:

in input byte sequence
out output byte sequence
actual_size input size
host_buffer_size host buffer size

decompress

uint64_t decompress (
    uint8_t* in,
    uint8_t* out,
    uint64_t actual_size,
    uint64_t original_size,
    uint32_t host_buffer_size,
    bool file_list_flag
    )

Decompress.

Parameters:

in input byte sequence
out output byte sequence
actual_size input size
original_size original size
host_buffer_size host buffer size

decompressFile

uint64_t decompressFile (
    std::string& inFile_name,
    std::string& outFile_name,
    uint64_t actual_size,
    bool file_list_flag,
    bool m_flow
    )

This module does the memory mapped execution of decompression where the I/O operations and kernel execution is done in sequential order.

Parameters:

in input byte sequence
out output byte sequence
actual_size input size
original_size original size
host_buffer_size host buffer size

compressFile

uint64_t compressFile (
    std::string& inFile_name,
    std::string& outFile_name,
    uint64_t actual_size,
    bool file_list_flag,
    bool m_flow
    )

This module is provided to support compress API and it’s not recommended to use for high throughput.

Parameters:

inFile_name input file name
outFile_name output file name
actual_size input size

xfLz4

xfLz4 ()

Class constructor.

~xfLz4

~xfLz4 ()

Class destructor.