6.3 Command structure for file compression


   6.3 Command structure for file compression


In order to compress a file, the following structure needs to contain all necessary parameters to perform the LZNV command.


#pragma pack(push, 8)

typedef struct _LZNV_PARAM_TYPE

{

    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, _LZNV_COMMAND_TEST

    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 _file_adler32;            // file adler32; use _LZNV_INITIAL as value to calculate

             

    uint32_t _reserved32;

    uint64_t _reserved64;


    int8_t   _sz_password[12];         // entropy coder future usage


    wchar_t  _source_file_path[_LZNV_MAXPATH_ + 1];

    wchar_t  _target_file_path[_LZNV_MAXPATH_ + 1];

}

LZNV_FILE_COMMAND_PARAMS, * P_LZNV_FILE_COMMAND_PARAMS;

#pragma pack(pop)