Command structure format for buffer encoding
5.3 Command structure for buffer compression
5.3 Command structure for buffer compression
In order to compress a buffer, the following structure needs to contain all necessary parameters to perform the LZNV command.
#pragma pack(push, 8)
typedef struct _LZNV_PARAM_TYPE_BUFFER_COMPRESSION_
{
uint8_t _verbose; // display more info
uint8_t _use_callback; // true/false
uint8_t _cpu_priority_level; // _LZNV_BELOW_NORMAL_PRIORITY_CLASS .. _LZNV_REALTIME_PRIORITY_CLASS
uint8_t _internal_verification; // performs also an internal verification only when compressing. slower.
uint8_t _encoding_method; // _LZNV_ULTRAFAST_COMPRESSION .. _LZNV_BETTER_COMPRESSION
uint8_t _command_to_execute; // _LZNV_COMMAND_ENCODE, _LZNV_COMMAND_DECODE
uint8_t _memory_level; // 0 = 256KB, 1 = 512KB, 2 = 1MB, 3 = 2MB, 4 = 4MB, 5 = 8MB, 6 = 16MB, 6 = 32MB, 7 = 64MB
uint8_t _reserved8;
uint32_t _block_adler32; // block adler32
uint32_t _reserved32; // reserved
uint64_t _reserved64; // reserved
int8_t _sz_password[12]; // entropy coder usage
uint8_t* _p_source_buffer; // Preallocate!
uint8_t* _p_destination_buffer; // Preallocate!
int32_t _i_source_buffer_size; // Non-Zero value
int32_t _i_destination_buffer_size; // Non-Zero value
}
LZNV_BUFFER_COMMAND_PARAMS, * P_LZNV_BUFFER_COMMAND_PARAMS;
#pragma pack(pop)