xrif
A fast lossless compression system
Utilities

Functions

size_t xrif_typesize (xrif_typecode_t type_code)
 Return the size of the type specified by the code. More...
 
double xrif_ts_difference (struct timespec *ts1, struct timespec *ts0)
 Calculate the difference between two timespecs. More...
 
const char * xrif_difference_method_string (int diff_method)
 Get a string describing the difference method. More...
 
const char * xrif_reorder_method_string (int reorder_method)
 Get a string describing the reordering method. More...
 
const char * xrif_compress_method_string (int compress_method)
 Get a string describing the compression method. More...
 

Function Documentation

◆ xrif_compress_method_string()

const char* xrif_compress_method_string ( int  compress_method)

Get a string describing the compression method.

Returns a pointer to a string describing the compression method.

Returns
a pointer to the string if compress_method is valid
NULL if compress_method is not valid
Parameters
[in]compress_method[in] the compression method

Definition at line 2224 of file xrif.c.

◆ xrif_difference_method_string()

const char* xrif_difference_method_string ( int  diff_method)

Get a string describing the difference method.

Returns a pointer to a string describing the difference method.

Returns
a pointer to the string if diff_method is valid
NULL if diff_method is not valid
Parameters
[in]diff_method[in] the difference method

Definition at line 2192 of file xrif.c.

◆ xrif_reorder_method_string()

const char* xrif_reorder_method_string ( int  reorder_method)

Get a string describing the reordering method.

Returns a pointer to a string describing the reordering method.

Returns
a pointer to the string if reorder_method is valid
NULL if reorder_method is not valid
Parameters
[in]reorder_method[in] the reorder method

Definition at line 2207 of file xrif.c.

◆ xrif_ts_difference()

double xrif_ts_difference ( struct timespec *  ts1,
struct timespec *  ts0 
)

Calculate the difference between two timespecs.

Calculates ts1-ts0 in double precision.

Returns
the difference in seconds between the two timespecs
Parameters
[in]ts1[in] the end time
[in]ts0[in] the start time

Definition at line 2185 of file xrif.c.

Referenced by xrif_compress_time(), xrif_decode_time(), xrif_decompress_time(), xrif_difference_time(), xrif_encode_time(), xrif_reorder_time(), xrif_undifference_time(), and xrif_unreorder_time().

◆ xrif_typesize()

size_t xrif_typesize ( xrif_typecode_t  type_code)

Return the size of the type specified by the code.

Returns
the equivalent to sizeof(type) for the specified type code.
0 if the type_code is invalid
Parameters
[in]type_code[in] the type code

Definition at line 2150 of file xrif.c.

References XRIF_TYPECODE_COMPLEX_DOUBLE, XRIF_TYPECODE_COMPLEX_FLOAT, XRIF_TYPECODE_DOUBLE, XRIF_TYPECODE_FLOAT, XRIF_TYPECODE_HALF, XRIF_TYPECODE_INT16, XRIF_TYPECODE_INT32, XRIF_TYPECODE_INT64, XRIF_TYPECODE_INT8, XRIF_TYPECODE_UINT16, XRIF_TYPECODE_UINT32, XRIF_TYPECODE_UINT64, and XRIF_TYPECODE_UINT8.

Referenced by xrif_set_size().