#include "Common/compat-c.h"


Go to the source code of this file.
Defines | |
| #define | BMZ_VER_NUM 0x0110 |
| Copyright (C) 2007 Luke Lu (Zvents, Inc. | |
| #define | BMZ_VER_MAJOR (BMZ_VER_NUM >> 12) |
| #define | BMZ_VER_MINOR ((BMZ_VER_NUM >> 8) & 0xf) |
| #define | BMZ_VER_RELEASE ((BMZ_VER_NUM >> 4) & 0xf) |
| #define | BMZ_VER_PATCH (BMZ_VER_NUM & 0xf) |
| #define | BMZ_E_OK 0 |
| #define | BMZ_E_ERROR (-1) |
| #define | BMZ_E_INPUT_OVERRUN (-4) |
| #define | BMZ_E_OUTPUT_OVERRUN (-5) |
Typedefs | |
| typedef void(* | BmzOutProc )(const char *msg, size_t len) |
| Signature of the messaging/logging procedure. | |
| typedef void(* | BmzDieProc )(const char *msg) HT_NORETURN |
| Signature of the fatal procedure. | |
Functions | |
| bmz_init () | |
| Perform bmz initialization only needs to be called once, mostly for sanity checks. | |
| 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. | |
| 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_pack_worklen (size_t in_len, size_t fp_len) | |
| Return size of work memory for bmz compression. | |
| bmz_unpack_worklen (size_t out_len) | |
| Return size of work memory for bmz decompression. | |
| bmz_set_verbosity (int verbosity) | |
| Set the verbosity of library for testing and debugging. | |
| bmz_set_out_proc (BmzOutProc proc) | |
| Set messaging/logging procedure. | |
| bmz_set_die_proc (BmzDieProc proc) | |
| Set fatal message procedure. | |
| bmz_checksum (const void *in, size_t in_len) | |
| A fast checksum (adler32) function that might be useful. | |
| bmz_update_checksum (unsigned s, const void *in, size_t in_len) | |
| #define BMZ_VER_NUM 0x0110 |
Copyright (C) 2007 Luke Lu (Zvents, Inc.
)
This file is part of Hypertable.
Hypertable is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License, or any later version.
Hypertable is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Hypertable. If not, see <http://www.gnu.org/licenses/>
| typedef void(* BmzDieProc)(const char *msg) HT_NORETURN |
| typedef void(* BmzOutProc)(const char *msg, size_t len) |
| bmz_checksum | ( | const void * | in, | |
| size_t | in_len | |||
| ) |
| bmz_init | ( | ) |
| 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 |
| bmz_pack_buflen | ( | size_t | in_len | ) |
| bmz_pack_worklen | ( | size_t | in_len, | |
| size_t | fp_len | |||
| ) |
| bmz_set_die_proc | ( | BmzDieProc | proc | ) |
Set fatal message procedure.
| proc | - pointer to a fatal function |
| bmz_set_out_proc | ( | BmzOutProc | proc | ) |
| bmz_set_verbosity | ( | int | verbosity | ) |
| 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 |
| bmz_unpack_worklen | ( | size_t | out_len | ) |
| bmz_update_checksum | ( | unsigned | s, | |
| const void * | in, | |||
| size_t | in_len | |||
| ) |
1.5.9