xrif
A fast lossless compression system
Encoding & Decoding

These functions perform a complete cycle of encode and decode.

Collaboration diagram for Encoding & Decoding:

Modules

 Differencing
 
 Reordering
 
 Compression & De-compression
 

Functions

xrif_error_t xrif_encode (xrif_t handle)
 Encode data using the xrif format. More...
 
xrif_error_t xrif_decode (xrif_t handle)
 Decode data from the xrif format. More...
 

Function Documentation

◆ xrif_decode()

xrif_error_t xrif_decode ( xrif_t  handle)

Decode data from the xrif format.

Calls xrif_decompress, xrif_unreorder, and xrif_undifference. If any of these returns an error, that error is returned.

The timespecs are updated during this call.

Returns
XRIF_ERROR_NULLPTR if the handle is NULL
XRIF_ERROR_NOTIMPL if any of xrif_handle::difference_method, xrif_handle::reorder_method, or xrif_handle::compress_method as set in the handle are not valid
XRIF_ERROR_INSUFFICIENT_SIZE if either xrif_handle::raw_buffer or xrif_handle::reordered_buffer are not of sufficient size for the configured handle
XRIF_NOERROR on success
See also
xrif_encode
Parameters
[in,out]handle[in/out] the xrif handle

Definition at line 1043 of file xrif.c.

References xrif_handle::difference_method, xrif_handle::ts_decompress_start, XRIF_ERROR_NULLPTR, and XRIF_ERROR_PRINT.

◆ xrif_encode()

xrif_error_t xrif_encode ( xrif_t  handle)

Encode data using the xrif format.

Calls xrif_difference(), xrif_reorder(), and xrif_compress(). If any of these returns an error, that error is returned. If all methods are NONE, this is a no-op and returns immediately.

The timespecs are updated during this call.

Returns
XRIF_ERROR_NULLPTR if the handle is NULL
XRIF_ERROR_NOTIMPL if any of xrif_handle::difference_method, xrif_handle::reorder_method, or xrif_handle::compress_method as set in the handle are not valid
XRIF_ERROR_INSUFFICIENT_SIZE if either xrif_handle::raw_buffer or xrif_handle::reordered_buffer are not of sufficient size for the configured handle
XRIF_NOERROR on success
See also
xrif_decode
Parameters
[in,out]handle[in/out] the xrif handle

Definition at line 966 of file xrif.c.

References xrif_handle::difference_method, xrif_handle::ts_difference_start, XRIF_ERROR_NULLPTR, and XRIF_ERROR_PRINT.