#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include "bmz-internal.h"
#include "ThirdParty/lzo/minilzo.h"
Go to the source code of this file.
Classes | |
struct | BmLutEntry |
struct | BmLut |
Macros | |
#define | BM_B1 257 |
#define | BM_B2 277 |
#define | BM_M1 0xffff |
#define | BM_M2 (0xffff - 4) |
#define | BM_MASK16 0xffff |
#define | BM_MASK24 0xffffff |
#define | BM_MASK32 0xffffffff |
#define | BM_MASKSZ BM_MASK32 |
#define | BM_ESC 0xfe |
#define | BM_MAX_LEN 0xfdffffffffffull /* 253TB block should be big enough */ |
#define | BM_MAX_1B 0xfd |
#define | BM_MAX_2B 0xfdff |
#define | BM_MAX_3B 0xfdffff |
#define | BM_MAX_4B 0xfdfffffful |
#define | BM_MAX_5B 0xfdffffffffull |
#define | BM_MAX_V1B 0x7f |
#define | BM_MAX_V2B 0x3fff |
#define | BM_MAX_V3B 0x1fffff |
#define | BM_MAX_V4B 0xfffffff |
#define | BM_MAX_V5B 0x7ffffffffull |
#define | BM_MAX_V6B 0x3ffffffffffull |
#define | BM_COLLISION_ABORT_THRESH 1 |
#define | BM_ABORT_COLLISIONS ((BM_COLLISION_ABORT_THRESH + 1) * collision_thresh + 1) |
#define | BM_COLOR_DBG "\x1b[31m" /* red */ |
#define | BM_COLOR_ALT "\x1b[32m" /* green */ |
#define | BM_COLOR_END "\x1b[m" |
#define | BM_NPOS ((size_t)-1) |
#define | BM_ALIGN(_mem_, _n_) (Byte *)(_mem_) + _n_ - (((size_t)(_mem_))%(_n_)) |
#define | BM_LOG(_level_, _fmt_,...) |
#define | BM_LOG_(_level_, _buf_, _len_) |
#define | BM_DIE(_fmt_,...) |
#define | BM_CHECK(_cond_) |
#define | BM_LOOKUP(_lut_, _hash_, _entry_) |
#define | R_HASH_MOD_BODY(_int_type_) |
#define | POW_MOD_BODY(_pow_fun_, _int_type_) |
#define | UPDATE_HASH_MOD_BODY |
#define | R_HASH_MASK_BODY(int_type) |
#define | POW_MASK_BODY(_pow_fun_, _int_type_) |
#define | UPDATE_HASH_MASK_BODY |
#define | BM_HASH_CHECK_BODY(_init_hash_, _rehash_, _update_hash_) |
#define | BM_HASH_BENCH_BODY(_init_hash_, _update_hash_) |
#define | BM_LUT_BENCH_BODY(_init_hash_, _update_hash_) |
#define | BM_NEED_IN(_n_) if ((int)(in_end - ip) < (int)(_n_)) goto input_overrun |
#define | BM_NEED_OUT(_n_) if ((int)(out_end - op) < (int)(_n_)) goto output_overrun |
#define | BM_ENCODE_OUTPUT(_op_, _ip_, _ip_end_) |
#define | BM_ENCODE_FINAL_OUTPUT(_op_, _ip_, _ip_end_) |
#define | BM_ENCODE_PASS |
#define | BM_ENCODE_INT(_op_, _n_, _width_) |
#define | BM_ENCODE_VINT(_op_, _n_, _width_) |
#define | BM_DECODE_VINT(_n_) |
#define | BM_INT_WIDTH(_n_) |
#define | BM_VINT_WIDTH(_n_) |
#define | BM_ENCODE_DELTA(_op_, _ipos_, _pos_, _len_) |
#define | BM_HANDLE_COLLISIONS(_randomize_, _init_hash_) |
#define | BM_ENCODE_STAT(_msg_) |
#define | BM_ENCODE_BODY(_init_hash_, _update_hash_, _randomize_) |
#define | BM_LZ_MAX(_len_) ((_len_) / 16 + 64 + 3) |
#define | BMZ_PACK_BODY(_bm_pack_) |
#define | BM_DECODE_POS(_cpos_, _n_) |
#define | BM_DECODE_LEN(_n_) BM_DECODE_VINT(_n_) |
Typedefs | |
typedef uint8_t | Byte |
typedef uint32_t | UInt32 |
typedef uint64_t | UInt64 |
typedef int64_t | Int64 |
typedef int32_t | Int32 |
typedef long long unsigned | Llu |
Functions | |
static void | builtin_out (const char *buf, size_t len) |
static HT_NORETURN void | builtin_die (const char *msg) |
int | bmz_set_verbosity (int verbosity) |
Set the verbosity of library for testing and debugging. More... | |
BmzOutProc | bmz_set_out_proc (BmzOutProc proc) |
Set messaging/logging procedure. More... | |
int | bmz_set_collision_thresh (int thresh) |
static size_t | random_prime (size_t excluded) |
static size_t | bm_lut_size (size_t n) |
static void | init_bmlut (BmLut *table, size_t n, void *work_mem) |
static UInt64 | r_hash_mod (const Byte *buf, size_t len, size_t b, UInt64 m) |
static UInt32 | r_hash_mod32 (const Byte *buf, size_t len, UInt32 b, UInt32 m) |
static UInt32 | r_hash_mod16x2 (const Byte *buf, size_t len, UInt32 b1, UInt32 b2, UInt32 m1, UInt32 m2) |
static UInt64 | pow_mod (UInt64 x, UInt64 n, UInt64 m) |
static UInt32 | pow_mod32 (UInt32 x, UInt32 n, UInt32 m) |
static Int64 | update_hash_mod (Int64 h, Byte in, Byte out, Int64 pow_n, Int64 b, Int64 m) |
static Int32 | update_hash_mod32 (Int32 h, Byte in, Byte out, Int32 pow_n, Int32 b, Int32 m) |
static UInt32 | update_hash_mod16x2 (UInt32 h, int in, int out, UInt32 pow1, UInt32 pow2, UInt32 b1, UInt32 b2, UInt32 m1, UInt32 m2) |
static UInt64 | r_hash_mask (const Byte *buf, size_t len, UInt64 b, UInt64 m) |
static UInt32 | r_hash_mask32 (const Byte *buf, size_t len, UInt32 b, UInt32 m) |
static UInt32 | r_hash_mask16x2 (const Byte *buf, size_t len, UInt32 b1, UInt32 b2) |
static UInt64 | r_hash_mask32x2 (const Byte *buf, size_t len, UInt64 b1, UInt64 b2) |
static UInt64 | pow_mask (UInt64 x, UInt64 n, UInt64 m) |
static UInt32 | pow_mask32 (UInt32 x, UInt32 n, UInt32 m) |
static UInt64 | update_hash_mask (UInt64 h, int in, int out, UInt64 pow_n, UInt64 b, UInt64 m) |
static UInt32 | update_hash_mask32 (UInt32 h, int in, int out, UInt32 pow_n, UInt32 b, UInt32 m) |
static UInt32 | update_hash_mask16x2 (UInt32 h, int in, int out, UInt32 pow1, UInt32 pow2, UInt32 b1, UInt32 b2) |
static UInt64 | update_hash_mask32x2 (UInt64 h, int in, int out, UInt64 pow1, UInt64 pow2, UInt64 b1, UInt64 b2) |
size_t | bmz_hash_mod (const void *in, size_t in_len, size_t b, size_t m) |
size_t | bmz_hash_mod16x2 (const void *in, size_t in_len, size_t b1, size_t b2, size_t m1, size_t m2) |
size_t | bmz_hash_mask16x2 (const void *in, size_t in_len, size_t b1, size_t b2) |
size_t | bmz_hash_mask (const void *in, size_t in_len, size_t b) |
size_t | bmz_hash_mask32x2 (const void *in, size_t in_len, size_t b1, size_t b2) |
int | bmz_check_hash_mod (const void *src, size_t in_len, size_t fp_len, size_t b, size_t m) |
void | bmz_bench_hash_mod (const void *src, size_t in_len, size_t fp_len) |
int | bmz_check_hash_mod16x2 (const void *src, size_t in_len, size_t fp_len, size_t b1, size_t b2, size_t m1, size_t m2) |
void | bmz_bench_hash_mod16x2 (const void *src, size_t in_len, size_t fp_len) |
int | bmz_check_hash_mask16x2 (const void *src, size_t in_len, size_t fp_len, size_t b1, size_t b2) |
void | bmz_bench_hash_mask16x2 (const void *src, size_t in_len, size_t fp_len) |
int | bmz_check_hash_mask (const void *src, size_t in_len, size_t fp_len, size_t b) |
void | bmz_bench_hash_mask (const void *src, size_t in_len, size_t fp_len) |
int | bmz_check_hash_mask32x2 (const void *src, size_t in_len, size_t fp_len, size_t b1, size_t b2) |
void | bmz_bench_hash_mask32x2 (const void *src, size_t in_len, size_t fp_len) |
void | bmz_bench_hash (const void *in, size_t in_len, unsigned type) |
void | bmz_bench_lut_mod (const void *src, size_t in_len, size_t fp_len, void *work_mem, size_t b, size_t m) |
void | bmz_bench_lut_mod16x2 (const void *src, size_t in_len, size_t fp_len, void *work_mem, size_t b1, size_t b2, size_t m1, size_t m2) |
void | bmz_bench_lut_mask16x2 (const void *src, size_t in_len, size_t fp_len, void *work_mem, size_t b1, size_t b2) |
void | bmz_bench_lut_mask (const void *src, size_t in_len, size_t fp_len, void *work_mem, size_t b) |
void | bmz_bench_lut_mask32x2 (const void *src, size_t in_len, size_t fp_len, void *work_mem, size_t b1, size_t b2) |
int | bmz_bm_pack_mod (const void *src, size_t in_len, void *dst, size_t *out_len_p, size_t offset, size_t fp_len, void *work_mem, size_t b, size_t m) |
int | bmz_bm_pack_mod16x2 (const void *src, size_t in_len, void *dst, size_t *out_len_p, size_t offset, size_t fp_len, void *work_mem, size_t b1, size_t b2, size_t m1, size_t m2) |
int | bmz_bm_pack_mask16x2 (const void *src, size_t in_len, void *dst, size_t *out_len_p, size_t offset, size_t fp_len, void *work_mem, size_t b1, size_t b2) |
int | bmz_bm_pack_mask (const void *src, size_t in_len, void *dst, size_t *out_len_p, size_t offset, size_t fp_len, void *work_mem, size_t b) |
int | bmz_bm_pack_mask32x2 (const void *src, size_t in_len, void *dst, size_t *out_len_p, size_t offset, size_t fp_len, void *work_mem, size_t b1, size_t b2) |
size_t | bmz_pack_buflen (size_t in_len) |
Compute bmz compression output buffer length. More... | |
size_t | bmz_bm_pack_worklen (size_t in_len, size_t fp_len) |
static size_t | bmz_pack_auxlen (size_t in_len, size_t fp_len) |
size_t | bmz_pack_worklen (size_t in_len, size_t fp_len) |
Return size of work memory for bmz compression. More... | |
size_t | bmz_unpack_worklen (size_t out_len) |
Return size of work memory for bmz decompression. More... | |
int | bmz_pack_mod (const void *in, size_t in_len, void *out, size_t *out_len_p, size_t offset, size_t fp_len, unsigned flags, void *work_mem, size_t b, size_t m) |
int | bmz_pack_mod16x2 (const void *in, size_t in_len, void *out, size_t *out_len_p, size_t offset, size_t fp_len, unsigned flags, void *work_mem, size_t b1, size_t b2, size_t m1, size_t m2) |
int | bmz_pack_mask16x2 (const void *in, size_t in_len, void *out, size_t *out_len_p, size_t offset, size_t fp_len, unsigned flags, void *work_mem, size_t b1, size_t b2) |
int | bmz_pack_mask (const void *in, size_t in_len, void *out, size_t *out_len_p, size_t offset, size_t fp_len, unsigned flags, void *work_mem, size_t b) |
int | bmz_pack_mask32x2 (const void *in, size_t in_len, void *out, size_t *out_len_p, size_t offset, size_t fp_len, unsigned flags, void *work_mem, size_t b1, size_t b2) |
int | bmz_pack (const void *in, size_t in_len, void *out, size_t *out_len_p, size_t offset, size_t fp_len, unsigned flags, void *work_mem) |
Perform bmz compression. More... | |
int | bmz_unpack (const void *in, size_t in_len, void *out, size_t *out_len_p, void *work_mem) |
Perform bmz decompression. More... | |
int | bmz_bm_unpack (const void *src, size_t in_len, void *dst, size_t *out_len_p) |
int | bmz_bm_dump (const void *src, size_t in_len) |
int | bmz_init () |
Perform bmz initialization only needs to be called once, mostly for sanity checks. More... | |
int | bmz_lz_pack (const void *in, size_t in_len, void *out, size_t *out_len_p, void *work_mem) |
size_t | bmz_lz_pack_worklen (size_t in_len) |
int | bmz_lz_unpack (const void *in, size_t in_len, void *out, size_t *out_len_p) |
unsigned | bmz_checksum (const void *in, size_t in_len) |
A fast checksum (adler32) function that might be useful. More... | |
unsigned | bmz_update_checksum (unsigned s, const void *in, size_t in_len) |
Variables | |
static size_t | s_primes [] |
static size_t | s_collision_thresh = 0 |
static int | s_verbosity = 0 |
static BmzOutProc | s_out_proc = builtin_out |
static BmzDieProc | s_die_proc = builtin_die |
#define BM_ABORT_COLLISIONS ((BM_COLLISION_ABORT_THRESH + 1) * collision_thresh + 1) |
#define BM_ALIGN | ( | _mem_, | |
_n_ | |||
) | (Byte *)(_mem_) + _n_ - (((size_t)(_mem_))%(_n_)) |
#define BM_CHECK | ( | _cond_ | ) |
#define BM_DECODE_LEN | ( | _n_ | ) | BM_DECODE_VINT(_n_) |
#define BM_DECODE_VINT | ( | _n_ | ) |
#define BM_DIE | ( | _fmt_, | |
... | |||
) |
#define BM_ENCODE_BODY | ( | _init_hash_, | |
_update_hash_, | |||
_randomize_ | |||
) |
#define BM_ENCODE_DELTA | ( | _op_, | |
_ipos_, | |||
_pos_, | |||
_len_ | |||
) |
#define BM_ENCODE_FINAL_OUTPUT | ( | _op_, | |
_ip_, | |||
_ip_end_ | |||
) |
#define BM_ENCODE_OUTPUT | ( | _op_, | |
_ip_, | |||
_ip_end_ | |||
) |
#define BM_ENCODE_PASS |
#define BM_ENCODE_STAT | ( | _msg_ | ) |
#define BM_HANDLE_COLLISIONS | ( | _randomize_, | |
_init_hash_ | |||
) |
#define BM_HASH_BENCH_BODY | ( | _init_hash_, | |
_update_hash_ | |||
) |
#define BM_HASH_CHECK_BODY | ( | _init_hash_, | |
_rehash_, | |||
_update_hash_ | |||
) |
#define BM_INT_WIDTH | ( | _n_ | ) |
#define BM_LOG | ( | _level_, | |
_fmt_, | |||
... | |||
) |
#define BM_LOG_ | ( | _level_, | |
_buf_, | |||
_len_ | |||
) |
#define BM_LOOKUP | ( | _lut_, | |
_hash_, | |||
_entry_ | |||
) |
#define BM_LUT_BENCH_BODY | ( | _init_hash_, | |
_update_hash_ | |||
) |
#define BM_MAX_LEN 0xfdffffffffffull /* 253TB block should be big enough */ |
#define BM_NEED_IN | ( | _n_ | ) | if ((int)(in_end - ip) < (int)(_n_)) goto input_overrun |
#define BM_NEED_OUT | ( | _n_ | ) | if ((int)(out_end - op) < (int)(_n_)) goto output_overrun |
#define BM_VINT_WIDTH | ( | _n_ | ) |
#define BMZ_PACK_BODY | ( | _bm_pack_ | ) |
#define POW_MASK_BODY | ( | _pow_fun_, | |
_int_type_ | |||
) |
#define POW_MOD_BODY | ( | _pow_fun_, | |
_int_type_ | |||
) |
#define R_HASH_MASK_BODY | ( | int_type | ) |
#define R_HASH_MOD_BODY | ( | _int_type_ | ) |
#define UPDATE_HASH_MASK_BODY |
#define UPDATE_HASH_MOD_BODY |
void bmz_bench_hash | ( | const void * | in, |
size_t | in_len, | ||
unsigned | type | ||
) |
void bmz_bench_hash_mask | ( | const void * | src, |
size_t | in_len, | ||
size_t | fp_len | ||
) |
void bmz_bench_hash_mask16x2 | ( | const void * | src, |
size_t | in_len, | ||
size_t | fp_len | ||
) |
void bmz_bench_hash_mask32x2 | ( | const void * | src, |
size_t | in_len, | ||
size_t | fp_len | ||
) |
void bmz_bench_hash_mod | ( | const void * | src, |
size_t | in_len, | ||
size_t | fp_len | ||
) |
void bmz_bench_hash_mod16x2 | ( | const void * | src, |
size_t | in_len, | ||
size_t | fp_len | ||
) |
void bmz_bench_lut_mask | ( | const void * | src, |
size_t | in_len, | ||
size_t | fp_len, | ||
void * | work_mem, | ||
size_t | b | ||
) |
void bmz_bench_lut_mask16x2 | ( | const void * | src, |
size_t | in_len, | ||
size_t | fp_len, | ||
void * | work_mem, | ||
size_t | b1, | ||
size_t | b2 | ||
) |
void bmz_bench_lut_mask32x2 | ( | const void * | src, |
size_t | in_len, | ||
size_t | fp_len, | ||
void * | work_mem, | ||
size_t | b1, | ||
size_t | b2 | ||
) |
void bmz_bench_lut_mod | ( | const void * | src, |
size_t | in_len, | ||
size_t | fp_len, | ||
void * | work_mem, | ||
size_t | b, | ||
size_t | m | ||
) |
void bmz_bench_lut_mod16x2 | ( | const void * | src, |
size_t | in_len, | ||
size_t | fp_len, | ||
void * | work_mem, | ||
size_t | b1, | ||
size_t | b2, | ||
size_t | m1, | ||
size_t | m2 | ||
) |
int bmz_bm_pack_mask | ( | const void * | src, |
size_t | in_len, | ||
void * | dst, | ||
size_t * | out_len_p, | ||
size_t | offset, | ||
size_t | fp_len, | ||
void * | work_mem, | ||
size_t | b | ||
) |
int bmz_bm_pack_mask16x2 | ( | const void * | src, |
size_t | in_len, | ||
void * | dst, | ||
size_t * | out_len_p, | ||
size_t | offset, | ||
size_t | fp_len, | ||
void * | work_mem, | ||
size_t | b1, | ||
size_t | b2 | ||
) |
int bmz_bm_pack_mask32x2 | ( | const void * | src, |
size_t | in_len, | ||
void * | dst, | ||
size_t * | out_len_p, | ||
size_t | offset, | ||
size_t | fp_len, | ||
void * | work_mem, | ||
size_t | b1, | ||
size_t | b2 | ||
) |
int bmz_bm_pack_mod | ( | const void * | src, |
size_t | in_len, | ||
void * | dst, | ||
size_t * | out_len_p, | ||
size_t | offset, | ||
size_t | fp_len, | ||
void * | work_mem, | ||
size_t | b, | ||
size_t | m | ||
) |
int bmz_bm_pack_mod16x2 | ( | const void * | src, |
size_t | in_len, | ||
void * | dst, | ||
size_t * | out_len_p, | ||
size_t | offset, | ||
size_t | fp_len, | ||
void * | work_mem, | ||
size_t | b1, | ||
size_t | b2, | ||
size_t | m1, | ||
size_t | m2 | ||
) |
int bmz_bm_unpack | ( | const void * | src, |
size_t | in_len, | ||
void * | dst, | ||
size_t * | out_len_p | ||
) |
int bmz_check_hash_mask | ( | const void * | src, |
size_t | in_len, | ||
size_t | fp_len, | ||
size_t | b | ||
) |
int bmz_check_hash_mask16x2 | ( | const void * | src, |
size_t | in_len, | ||
size_t | fp_len, | ||
size_t | b1, | ||
size_t | b2 | ||
) |
int bmz_check_hash_mask32x2 | ( | const void * | src, |
size_t | in_len, | ||
size_t | fp_len, | ||
size_t | b1, | ||
size_t | b2 | ||
) |
int bmz_check_hash_mod | ( | const void * | src, |
size_t | in_len, | ||
size_t | fp_len, | ||
size_t | b, | ||
size_t | m | ||
) |
int bmz_check_hash_mod16x2 | ( | const void * | src, |
size_t | in_len, | ||
size_t | fp_len, | ||
size_t | b1, | ||
size_t | b2, | ||
size_t | m1, | ||
size_t | m2 | ||
) |
unsigned bmz_checksum | ( | const void * | in, |
size_t | in_len | ||
) |
size_t bmz_hash_mask | ( | const void * | in, |
size_t | in_len, | ||
size_t | b | ||
) |
size_t bmz_hash_mask16x2 | ( | const void * | in, |
size_t | in_len, | ||
size_t | b1, | ||
size_t | b2 | ||
) |
size_t bmz_hash_mask32x2 | ( | const void * | in, |
size_t | in_len, | ||
size_t | b1, | ||
size_t | b2 | ||
) |
size_t bmz_hash_mod | ( | const void * | in, |
size_t | in_len, | ||
size_t | b, | ||
size_t | m | ||
) |
size_t bmz_hash_mod16x2 | ( | const void * | in, |
size_t | in_len, | ||
size_t | b1, | ||
size_t | b2, | ||
size_t | m1, | ||
size_t | m2 | ||
) |
int bmz_init | ( | ) |
int bmz_lz_pack | ( | const void * | in, |
size_t | in_len, | ||
void * | out, | ||
size_t * | out_len_p, | ||
void * | work_mem | ||
) |
int bmz_lz_unpack | ( | const void * | in, |
size_t | in_len, | ||
void * | out, | ||
size_t * | out_len_p | ||
) |
int bmz_pack | ( | const void * | in, |
size_t | in_len, | ||
void * | out, | ||
size_t * | out_len_p, | ||
size_t | offset, | ||
size_t | fp_len, | ||
unsigned | flags, | ||
void * | work_mem | ||
) |
Perform bmz compression.
in | - input buffer |
in_len | - input buffer length in bytes |
out | - output buffer for compressed data |
out_len_p | - pointer to the length of output, which specifies the size of the output buffer as input and is set to the length of compressed data on return |
offset | - starting offset of fingerprints, use 0 if you have to ask |
fp_len | - fingerprint length, use 50 if you have to ask |
flags | - compression options. See BMZ_F_* defines. |
work_mem | - pointer to work memory buffer, cf. bmz_pack_worklen |
|
static |
size_t bmz_pack_buflen | ( | size_t | in_len | ) |
int bmz_pack_mask | ( | const void * | in, |
size_t | in_len, | ||
void * | out, | ||
size_t * | out_len_p, | ||
size_t | offset, | ||
size_t | fp_len, | ||
unsigned | flags, | ||
void * | work_mem, | ||
size_t | b | ||
) |
int bmz_pack_mask16x2 | ( | const void * | in, |
size_t | in_len, | ||
void * | out, | ||
size_t * | out_len_p, | ||
size_t | offset, | ||
size_t | fp_len, | ||
unsigned | flags, | ||
void * | work_mem, | ||
size_t | b1, | ||
size_t | b2 | ||
) |
int bmz_pack_mask32x2 | ( | const void * | in, |
size_t | in_len, | ||
void * | out, | ||
size_t * | out_len_p, | ||
size_t | offset, | ||
size_t | fp_len, | ||
unsigned | flags, | ||
void * | work_mem, | ||
size_t | b1, | ||
size_t | b2 | ||
) |
int bmz_pack_mod | ( | const void * | in, |
size_t | in_len, | ||
void * | out, | ||
size_t * | out_len_p, | ||
size_t | offset, | ||
size_t | fp_len, | ||
unsigned | flags, | ||
void * | work_mem, | ||
size_t | b, | ||
size_t | m | ||
) |
int bmz_pack_mod16x2 | ( | const void * | in, |
size_t | in_len, | ||
void * | out, | ||
size_t * | out_len_p, | ||
size_t | offset, | ||
size_t | fp_len, | ||
unsigned | flags, | ||
void * | work_mem, | ||
size_t | b1, | ||
size_t | b2, | ||
size_t | m1, | ||
size_t | m2 | ||
) |
size_t bmz_pack_worklen | ( | size_t | in_len, |
size_t | fp_len | ||
) |
BmzOutProc bmz_set_out_proc | ( | BmzOutProc | proc | ) |
int bmz_set_verbosity | ( | int | verbosity | ) |
int bmz_unpack | ( | const void * | in, |
size_t | in_len, | ||
void * | out, | ||
size_t * | out_len_p, | ||
void * | work_mem | ||
) |
Perform bmz decompression.
in | - input buffer (compressed) |
in_len | - input buffer length in bytes |
out | - output buffer |
out_len_p | - pointer to the length of output, which specifies the size of the output buffer and is set to length of uncompressed data on return; |
work_mem | - pointer to work memory buffer, cf. bmz_unpack_worklen |
size_t bmz_unpack_worklen | ( | size_t | out_len | ) |
unsigned bmz_update_checksum | ( | unsigned | s, |
const void * | in, | ||
size_t | in_len | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |