#include "snappy_compress.hpp"
template < int MAX_LIT_COUNT, int MAX_LIT_STREAM_SIZE, int PARALLEL_UNITS > static void snappyCompress ( hls::stream <ap_uint <32>>& inStream, hls::stream <ap_uint <8>>& outStream, uint32_t max_lit_limit [PARALLEL_UNITS], uint32_t input_size, hls::stream <bool>& endOfStream, hls::stream <uint32_t>& compressdSizeStream, uint32_t index )
This is the core compression module which seperates the input stream into two output streams, one literal stream and other offset stream, then encoding is done based on the snappy algorithm.
Parameters:
MAX_LIT_COUNT | encoded literal length count |
MAX_LIT_STREAM_SIZE | encoded literal stream size |
PARALLEL_UNITS | number of parallel processed units |
inStream | Input data stream |
outStream | Output data stream |
max_lit_limit | Size for compressed stream |
input_size | Size of input data |
endOfStream | Stream indicating that all data is processed or not |
compressdSizeStream | Gives the compressed size for each 64K block |
index | index value |