Go to the source code of this file.
Macros | |
#define | DELTANEXTMAXD(p) chainTable[(p) & LZ4HC_MAXD_MASK] /* flexible, LZ4HC_MAXD dependent */ |
#define | DELTANEXTU16(table, pos) table[(U16)(pos)] /* faster */ |
#define | HASH_FUNCTION(i) (((i) * 2654435761U) >> ((MINMATCH*8)-LZ4HC_HASH_LOG)) |
#define | LZ4_COMMONDEFS_ONLY |
#define | LZ4HC_DEBUG 0 |
#define | LZ4HC_HEAPMODE 1 |
#define | OPTIMAL_ML (int)((ML_MASK-1)+MINMATCH) |
Enumerations | |
enum | limitedOutput_directive { notLimited = 0, limitedOutput = 1, noLimit = 0, limitedOutput = 1, limitedDestSize = 2 } |
Functions | |
int | LZ4_compress_HC (const char *src, char *dst, int srcSize, int dstCapacity, int compressionLevel) |
int | LZ4_compress_HC_continue (LZ4_streamHC_t *LZ4_streamHCPtr, const char *src, char *dst, int srcSize, int dstCapacity) |
int | LZ4_compress_HC_continue_destSize (LZ4_streamHC_t *LZ4_streamHCPtr, const char *src, char *dst, int *srcSizePtr, int targetDestSize) |
int | LZ4_compress_HC_destSize (void *LZ4HC_Data, const char *source, char *dest, int *sourceSizePtr, int targetDestSize, int cLevel) |
int | LZ4_compress_HC_extStateHC (void *state, const char *src, char *dst, int srcSize, int dstCapacity, int compressionLevel) |
int | LZ4_compressHC (const char *src, char *dst, int srcSize) |
int | LZ4_compressHC2 (const char *src, char *dst, int srcSize, int cLevel) |
int | LZ4_compressHC2_continue (void *LZ4HC_Data, const char *src, char *dst, int srcSize, int cLevel) |
int | LZ4_compressHC2_limitedOutput (const char *src, char *dst, int srcSize, int maxDstSize, int cLevel) |
int | LZ4_compressHC2_limitedOutput_continue (void *LZ4HC_Data, const char *src, char *dst, int srcSize, int dstCapacity, int cLevel) |
int | LZ4_compressHC2_limitedOutput_withStateHC (void *state, const char *src, char *dst, int srcSize, int maxDstSize, int cLevel) |
int | LZ4_compressHC2_withStateHC (void *state, const char *src, char *dst, int srcSize, int cLevel) |
int | LZ4_compressHC_continue (LZ4_streamHC_t *ctx, const char *src, char *dst, int srcSize) |
static int | LZ4_compressHC_continue_generic (LZ4_streamHC_t *LZ4_streamHCPtr, const char *src, char *dst, int *srcSizePtr, int dstCapacity, limitedOutput_directive limit) |
int | LZ4_compressHC_limitedOutput (const char *src, char *dst, int srcSize, int maxDstSize) |
int | LZ4_compressHC_limitedOutput_continue (LZ4_streamHC_t *ctx, const char *src, char *dst, int srcSize, int maxDstSize) |
int | LZ4_compressHC_limitedOutput_withStateHC (void *state, const char *src, char *dst, int srcSize, int maxDstSize) |
int | LZ4_compressHC_withStateHC (void *state, const char *src, char *dst, int srcSize) |
void * | LZ4_createHC (char *inputBuffer) |
LZ4_streamHC_t * | LZ4_createStreamHC (void) |
int | LZ4_freeHC (void *LZ4HC_Data) |
int | LZ4_freeStreamHC (LZ4_streamHC_t *LZ4_streamHCPtr) |
int | LZ4_loadDictHC (LZ4_streamHC_t *LZ4_streamHCPtr, const char *dictionary, int dictSize) |
void | LZ4_resetStreamHC (LZ4_streamHC_t *LZ4_streamHCPtr, int compressionLevel) |
int | LZ4_resetStreamStateHC (void *state, char *inputBuffer) |
int | LZ4_saveDictHC (LZ4_streamHC_t *LZ4_streamHCPtr, char *safeBuffer, int dictSize) |
int | LZ4_sizeofStateHC (void) |
int | LZ4_sizeofStreamStateHC (void) |
char * | LZ4_slideInputBufferHC (void *LZ4HC_Data) |
static int | LZ4HC_compress_generic (LZ4HC_CCtx_internal *const ctx, const char *const src, char *const dst, int *const srcSizePtr, int const dstCapacity, int cLevel, limitedOutput_directive limit) |
static int | LZ4HC_compress_hashChain (LZ4HC_CCtx_internal *const ctx, const char *const source, char *const dest, int *srcSizePtr, int const maxOutputSize, unsigned maxNbAttempts, limitedOutput_directive limit) |
FORCE_INLINE int | LZ4HC_encodeSequence (const BYTE **ip, BYTE **op, const BYTE **anchor, int matchLength, const BYTE *const match, limitedOutput_directive limit, BYTE *oend) |
static int | LZ4HC_getSearchNum (int compressionLevel) |
static U32 | LZ4HC_hashPtr (const void *ptr) |
static void | LZ4HC_init (LZ4HC_CCtx_internal *hc4, const BYTE *start) |
FORCE_INLINE void | LZ4HC_Insert (LZ4HC_CCtx_internal *hc4, const BYTE *ip) |
FORCE_INLINE int | LZ4HC_InsertAndFindBestMatch (LZ4HC_CCtx_internal *const hc4, const BYTE *const ip, const BYTE *const iLimit, const BYTE **matchpos, const int maxNbAttempts) |
FORCE_INLINE int | LZ4HC_InsertAndGetWiderMatch (LZ4HC_CCtx_internal *hc4, const BYTE *const ip, const BYTE *const iLowLimit, const BYTE *const iHighLimit, int longest, const BYTE **matchpos, const BYTE **startpos, const int maxNbAttempts) |
static void | LZ4HC_setExternalDict (LZ4HC_CCtx_internal *ctxPtr, const BYTE *newBlock) |
#define DELTANEXTMAXD | ( | p | ) | chainTable[(p) & LZ4HC_MAXD_MASK] /* flexible, LZ4HC_MAXD dependent */ |
#define LZ4HC_HEAPMODE 1 |
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_CLEVEL_MAX will work. Values >LZ4HC_CLEVEL_MAX behave the same as LZ4HC_CLEVEL_MAX.
int LZ4_compress_HC_continue | ( | LZ4_streamHC_t * | LZ4_streamHCPtr, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | dstCapacity | ||
) |
int LZ4_compress_HC_continue_destSize | ( | LZ4_streamHC_t * | LZ4_streamHCPtr, |
const char * | src, | ||
char * | dst, | ||
int * | srcSizePtr, | ||
int | targetDestSize | ||
) |
int LZ4_compress_HC_destSize | ( | void * | LZ4HC_Data, |
const char * | source, | ||
char * | dest, | ||
int * | sourceSizePtr, | ||
int | targetDestSize, | ||
int | cLevel | ||
) |
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).
int LZ4_compressHC | ( | const char * | src, |
char * | dst, | ||
int | srcSize | ||
) |
int LZ4_compressHC2 | ( | const char * | src, |
char * | dst, | ||
int | srcSize, | ||
int | cLevel | ||
) |
int LZ4_compressHC2_continue | ( | void * | LZ4HC_Data, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | cLevel | ||
) |
int LZ4_compressHC2_limitedOutput | ( | const char * | src, |
char * | dst, | ||
int | srcSize, | ||
int | maxDstSize, | ||
int | cLevel | ||
) |
int LZ4_compressHC2_limitedOutput_continue | ( | void * | LZ4HC_Data, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | dstCapacity, | ||
int | cLevel | ||
) |
int LZ4_compressHC2_limitedOutput_withStateHC | ( | void * | state, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | maxDstSize, | ||
int | cLevel | ||
) |
int LZ4_compressHC2_withStateHC | ( | void * | state, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | cLevel | ||
) |
int LZ4_compressHC_continue | ( | LZ4_streamHC_t * | ctx, |
const char * | src, | ||
char * | dst, | ||
int | srcSize | ||
) |
|
static |
int LZ4_compressHC_limitedOutput | ( | const char * | src, |
char * | dst, | ||
int | srcSize, | ||
int | maxDstSize | ||
) |
int LZ4_compressHC_limitedOutput_continue | ( | LZ4_streamHC_t * | ctx, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | maxDstSize | ||
) |
int LZ4_compressHC_limitedOutput_withStateHC | ( | void * | state, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | maxDstSize | ||
) |
int LZ4_compressHC_withStateHC | ( | void * | state, |
const char * | src, | ||
char * | dst, | ||
int | srcSize | ||
) |
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.
int LZ4_freeStreamHC | ( | LZ4_streamHC_t * | LZ4_streamHCPtr | ) |
int LZ4_loadDictHC | ( | LZ4_streamHC_t * | LZ4_streamHCPtr, |
const char * | dictionary, | ||
int | dictSize | ||
) |
void LZ4_resetStreamHC | ( | LZ4_streamHC_t * | LZ4_streamHCPtr, |
int | compressionLevel | ||
) |
int LZ4_resetStreamStateHC | ( | void * | state, |
char * | inputBuffer | ||
) |
int LZ4_saveDictHC | ( | LZ4_streamHC_t * | LZ4_streamHCPtr, |
char * | safeBuffer, | ||
int | dictSize | ||
) |
|
static |
|
static |
FORCE_INLINE int LZ4HC_encodeSequence | ( | const BYTE ** | ip, |
BYTE ** | op, | ||
const BYTE ** | anchor, | ||
int | matchLength, | ||
const BYTE *const | match, | ||
limitedOutput_directive | limit, | ||
BYTE * | oend | ||
) |
|
static |
|
static |
FORCE_INLINE void LZ4HC_Insert | ( | LZ4HC_CCtx_internal * | hc4, |
const BYTE * | ip | ||
) |
FORCE_INLINE int LZ4HC_InsertAndFindBestMatch | ( | LZ4HC_CCtx_internal *const | hc4, |
const BYTE *const | ip, | ||
const BYTE *const | iLimit, | ||
const BYTE ** | matchpos, | ||
const int | maxNbAttempts | ||
) |
FORCE_INLINE int LZ4HC_InsertAndGetWiderMatch | ( | LZ4HC_CCtx_internal * | hc4, |
const BYTE *const | ip, | ||
const BYTE *const | iLowLimit, | ||
const BYTE *const | iHighLimit, | ||
int | longest, | ||
const BYTE ** | matchpos, | ||
const BYTE ** | startpos, | ||
const int | maxNbAttempts | ||
) |
|
static |