Simple and Comprehensive APIs for compression/decompression.
More...
|
| int | unishox2_compress_simple (const char *in, int len, char *out) |
| int | unishox2_decompress_simple (const char *in, int len, char *out) |
| int | unishox2_compress (const char *in, int len, char *out, int olen, const unsigned char usx_hcodes[], const unsigned char usx_hcode_lens[], const char *usx_freq_seq[], const char *usx_templates[]) |
| int | unishox2_decompress (const char *in, int len, char *out, int olen, const unsigned char usx_hcodes[], const unsigned char usx_hcode_lens[], const char *usx_freq_seq[], const char *usx_templates[]) |
Simple and Comprehensive APIs for compression/decompression.
◆ unishox2_compress()
| int unishox2_compress |
( |
const char * | in, |
|
|
int | len, |
|
|
char * | out, |
|
|
int | olen, |
|
|
const unsigned char | usx_hcodes[], |
|
|
const unsigned char | usx_hcode_lens[], |
|
|
const char * | usx_freq_seq[], |
|
|
const char * | usx_templates[] ) |
|
extern |
Comprehensive API for compressing a string
Presets are available for the last four parameters so they can be passed as single parameter.
See USX_PSET_* macros. Example call:
unishox2_compress(in, len, out, olen, USX_PSET_ALPHA_ONLY);
- Parameters
-
| [in] | in | Input ASCII / UTF-8 string |
| [in] | len | length in bytes |
| [out] | out | output buffer - should be large enough to hold compressed output |
| [in] | olen | length of 'out' buffer in bytes. Can be omitted if sufficient buffer is provided |
| [in] | usx_hcodes | Horizontal codes (array of bytes). See macro section for samples. |
| [in] | usx_hcode_lens | Length of each element in usx_hcodes array |
| [in] | usx_freq_seq | Frequently occuring sequences. See USX_FREQ_SEQ_* macros for samples |
| [in] | usx_templates | Templates of frequently occuring patterns. See USX_TEMPLATES macro. |
◆ unishox2_compress_simple()
| int unishox2_compress_simple |
( |
const char * | in, |
|
|
int | len, |
|
|
char * | out ) |
|
extern |
Simple API for compressing a string
- Parameters
-
| [in] | in | Input ASCII / UTF-8 string |
| [in] | len | length in bytes |
| [out] | out | output buffer - should be large enough to hold compressed output |
◆ unishox2_decompress()
| int unishox2_decompress |
( |
const char * | in, |
|
|
int | len, |
|
|
char * | out, |
|
|
int | olen, |
|
|
const unsigned char | usx_hcodes[], |
|
|
const unsigned char | usx_hcode_lens[], |
|
|
const char * | usx_freq_seq[], |
|
|
const char * | usx_templates[] ) |
|
extern |
Comprehensive API for de-compressing a string
Presets are available for the last four parameters so they can be passed as single parameter.
See USX_PSET_* macros. Example call:
unishox2_decompress(in, len, out, olen, USX_PSET_ALPHA_ONLY);
- Parameters
-
| [in] | in | Input compressed bytes (output of unishox2_compress functions) |
| [in] | len | length of 'in' in bytes |
| [out] | out | output buffer - should be large enough to hold de-compressed output |
| [in] | olen | length of 'out' buffer in bytes. Can be omitted if sufficient buffer is provided |
| [in] | usx_hcodes | Horizontal codes (array of bytes). See macro section for samples. |
| [in] | usx_hcode_lens | Length of each element in usx_hcodes array |
| [in] | usx_freq_seq | Frequently occuring sequences. See USX_FREQ_SEQ_* macros for samples |
| [in] | usx_templates | Templates of frequently occuring patterns. See USX_TEMPLATES macro. |
◆ unishox2_decompress_simple()
| int unishox2_decompress_simple |
( |
const char * | in, |
|
|
int | len, |
|
|
char * | out ) |
|
extern |
Simple API for decompressing a string
- Parameters
-
| [in] | in | Input compressed bytes (output of unishox2_compress functions) |
| [in] | len | length of 'in' in bytes |
| [out] | out | output buffer for ASCII / UTF-8 string - should be large enough |