20 #ifndef HYPERTABLE_BMZ_H
21 #define HYPERTABLE_BMZ_H
25 #define BMZ_VER_NUM 0x0110
26 #define BMZ_VER_MAJOR (BMZ_VER_NUM >> 12)
27 #define BMZ_VER_MINOR ((BMZ_VER_NUM >> 8) & 0xf)
28 #define BMZ_VER_RELEASE ((BMZ_VER_NUM >> 4) & 0xf)
29 #define BMZ_VER_PATCH (BMZ_VER_NUM & 0xf)
33 #define BMZ_E_ERROR (-1)
34 #define BMZ_E_INPUT_OVERRUN (-4)
35 #define BMZ_E_OUTPUT_OVERRUN (-5)
61 bmz_pack(const
void *in,
size_t in_len,
void *out,
size_t *out_len_p,
62 size_t offset,
size_t fp_len,
unsigned flags,
void *work_mem);
76 bmz_unpack(const
void *in,
size_t in_len,
void *out,
size_t *out_len_p,
bmz_unpack(const void *in, size_t in_len, void *out, size_t *out_len_p, void *work_mem)
Perform bmz decompression.
bmz_pack_buflen(size_t in_len)
Compute bmz compression output buffer length.
bmz_set_die_proc(BmzDieProc proc)
Set fatal message procedure.
bmz_init()
Perform bmz initialization only needs to be called once, mostly for sanity checks.
bmz_set_verbosity(int verbosity)
Set the verbosity of library for testing and debugging.
bmz_update_checksum(unsigned s, const void *in, size_t in_len)
bmz_checksum(const void *in, size_t in_len)
A fast checksum (adler32) function that might be useful.
#define HT_EXTERN(ret_type)
void(* BmzDieProc)(const char *msg) HT_NORETURN
Signature of the fatal procedure.
bmz_unpack_worklen(size_t out_len)
Return size of work memory for bmz decompression.
bmz_set_out_proc(BmzOutProc proc)
Set messaging/logging procedure.
bmz_pack_worklen(size_t in_len, size_t fp_len)
Return size of work memory for bmz compression.
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.
void(* BmzOutProc)(const char *msg, size_t len)
Signature of the messaging/logging procedure.
Required portability definitions for all .cc files.