#include "lz4.h"
Go to the source code of this file.
Classes | |
struct | LZ4HC_CCtx_internal |
union | LZ4_streamHC_u |
Macros | |
#define | LZ4HC_CLEVEL_MIN 3 |
#define | LZ4HC_CLEVEL_DEFAULT 9 |
#define | LZ4HC_CLEVEL_OPT_MIN 11 |
#define | LZ4HC_CLEVEL_MAX 12 |
#define | LZ4HC_DICTIONARY_LOGSIZE 17 |
#define | LZ4HC_MAXD (1<<LZ4HC_DICTIONARY_LOGSIZE) |
#define | LZ4HC_MAXD_MASK (LZ4HC_MAXD - 1) |
#define | LZ4HC_HASH_LOG 15 |
#define | LZ4HC_HASHTABLESIZE (1 << LZ4HC_HASH_LOG) |
#define | LZ4HC_HASH_MASK (LZ4HC_HASHTABLESIZE - 1) |
#define | LZ4_STREAMHCSIZE (4*LZ4HC_HASHTABLESIZE + 2*LZ4HC_MAXD + 56) /* 393268 */ |
#define | LZ4_STREAMHCSIZE_SIZET (LZ4_STREAMHCSIZE / sizeof(size_t)) |
Typedefs | |
typedef union LZ4_streamHC_u | LZ4_streamHC_t |
Variables | |
char * | dest |
char int | inputSize |
char int int | maxOutputSize |
char int int | compressionLevel |
const char * | source |
char * | inputBuffer |
#define LZ4_STREAMHCSIZE (4*LZ4HC_HASHTABLESIZE + 2*LZ4HC_MAXD + 56) /* 393268 */ |
Definition at line 180 of file lz4hc.h.
Referenced by LZ4_sizeofStreamStateHC().
#define LZ4_STREAMHCSIZE_SIZET (LZ4_STREAMHCSIZE / sizeof(size_t)) |
Definition at line 181 of file lz4hc.h.
Referenced by LZ4_resetStreamHC().
#define LZ4HC_CLEVEL_DEFAULT 9 |
Definition at line 48 of file lz4hc.h.
Referenced by calib::ADCShapeFitTable::ADCShapeFitTable(), and LZ4HC_compress_generic().
#define LZ4HC_CLEVEL_OPT_MIN 11 |
Definition at line 49 of file lz4hc.h.
Referenced by LZ4_loadDictHC(), and LZ4HC_setExternalDict().
#define LZ4HC_HASH_MASK (LZ4HC_HASHTABLESIZE - 1) |
#define LZ4HC_HASHTABLESIZE (1 << LZ4HC_HASH_LOG) |
#define LZ4HC_MAXD (1<<LZ4HC_DICTIONARY_LOGSIZE) |
#define LZ4HC_MAXD_MASK (LZ4HC_MAXD - 1) |
typedef union LZ4_streamHC_u LZ4_streamHC_t |
LZ4LIB_API int LZ4_compress_HC | ( | const char * | src, |
char * | dst, | ||
int | srcSize, | ||
int | dstCapacity, | ||
int | compressionLevel | ||
) |
LZ4_compress_HC() : Compress data from src
into dst
, using the more powerful but slower "HC" algorithm. dst
must be already allocated. Compression is guaranteed to succeed if dstCapacity >= LZ4_compressBound(srcSize)
(see "lz4.h") Max supported srcSize
value is LZ4_MAX_INPUT_SIZE (see "lz4.h") compressionLevel
: Recommended values are between 4 and 9, although any value between 1 and LZ4HC_MAX_CLEVEL will work. Values >LZ4HC_MAX_CLEVEL behave the same as LZ4HC_MAX_CLEVEL.
Definition at line 534 of file lz4hc.cxx.
References LZ4_compress_HC_extStateHC(), and makeDatasetsPage::state.
Referenced by calib::ADCShapeFitTable::ADCShapeFitTable(), LZ4_compressHC(), LZ4_compressHC2(), LZ4_compressHC2_limitedOutput(), and LZ4_compressHC_limitedOutput().
LZ4LIB_API int LZ4_compress_HC_continue | ( | LZ4_streamHC_t * | streamHCPtr, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | maxDstSize | ||
) |
Definition at line 635 of file lz4hc.cxx.
References limitedOutput, LZ4_compressBound(), LZ4_compressHC_continue_generic(), and noLimit.
Referenced by LZ4_compressHC_continue(), and LZ4_compressHC_limitedOutput_continue().
LZ4LIB_API int LZ4_compress_HC_extStateHC | ( | void * | state, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | maxDstSize, | ||
int | compressionLevel | ||
) |
LZ4_compress_HC_extStateHC() : Same as LZ4_compress_HC(), but using an externally allocated memory segment for state
. state
size is provided by LZ4_sizeofStateHC(). Memory segment must be aligned on 8-bytes boundaries (which a normal malloc() will do properly).
Definition at line 523 of file lz4hc.cxx.
References limitedOutput, LZ4_compressBound(), LZ4HC_compress_generic(), LZ4HC_init(), noLimit, and makeDatasetsPage::state.
Referenced by LZ4_compress_HC(), LZ4_compressHC2_limitedOutput_withStateHC(), LZ4_compressHC2_withStateHC(), LZ4_compressHC_limitedOutput_withStateHC(), and LZ4_compressHC_withStateHC().
LZ4LIB_API LZ4_streamHC_t* LZ4_createStreamHC | ( | void | ) |
LZ4_createStreamHC() and LZ4_freeStreamHC() : These functions create and release memory for LZ4 HC streaming state. Newly created states are automatically initialized. Existing states can be re-used several times, using LZ4_resetStreamHC(). These methods are API and ABI stable, they can be used in combination with a DLL.
Definition at line 555 of file lz4hc.cxx.
LZ4_DEPRECATED | ( | "use LZ4_compress_HC() instead" | ) | const |
LZ4_DEPRECATED | ( | "use LZ4_compress_HC_extStateHC() instead" | ) |
LZ4_DEPRECATED | ( | "use LZ4_compress_HC_continue() instead" | ) |
LZ4_DEPRECATED | ( | "use LZ4_createStreamHC() instead" | ) |
LZ4_DEPRECATED | ( | "use LZ4_saveDictHC() instead" | ) |
LZ4_DEPRECATED | ( | "use LZ4_freeStreamHC() instead" | ) |
LZ4_DEPRECATED | ( | "use LZ4_resetStreamHC() instead" | ) |
LZ4LIB_API int LZ4_freeStreamHC | ( | LZ4_streamHC_t * | streamHCPtr | ) |
LZ4LIB_API int LZ4_loadDictHC | ( | LZ4_streamHC_t * | streamHCPtr, |
const char * | dictionary, | ||
int | dictSize | ||
) |
Definition at line 568 of file lz4hc.cxx.
References LZ4HC_CCtx_internal::compressionLevel, LZ4HC_CCtx_internal::end, LZ4_streamHC_u::internal_donotuse, KB, LASTLITERALS, LZ4HC_CLEVEL_OPT_MIN, LZ4HC_init(), LZ4HC_Insert(), LZ4HC_updateBinTree(), and MFLIMIT.
Referenced by LZ4_compressHC_continue_generic().
LZ4LIB_API void LZ4_resetStreamHC | ( | LZ4_streamHC_t * | streamHCPtr, |
int | compressionLevel | ||
) |
Definition at line 560 of file lz4hc.cxx.
References LZ4HC_CCtx_internal::base, LZ4HC_CCtx_internal::compressionLevel, LZ4_streamHC_u::internal_donotuse, LZ4_STATIC_ASSERT, LZ4_STREAMHCSIZE_SIZET, LZ4HC_getSearchNum(), and LZ4HC_CCtx_internal::searchNum.
LZ4LIB_API int LZ4_saveDictHC | ( | LZ4_streamHC_t * | streamHCPtr, |
char * | safeBuffer, | ||
int | maxDictSize | ||
) |
Definition at line 646 of file lz4hc.cxx.
References LZ4HC_CCtx_internal::base, LZ4HC_CCtx_internal::dictLimit, LZ4HC_CCtx_internal::end, makeTrainCVSamples::int, LZ4_streamHC_u::internal_donotuse, KB, LZ4HC_CCtx_internal::lowLimit, and LZ4HC_CCtx_internal::nextToUpdate.
Referenced by LZ4_slideInputBufferHC().
LZ4LIB_API int LZ4_sizeofStateHC | ( | void | ) |
Definition at line 205 of file lz4hc.h.
Referenced by hdf5::HDF5Header< Tidx >::Fill(), and hdf5::make_col().