Classes | Macros | Enumerations | Functions
lz4hc.c File Reference
#include "lz4hc.h"
#include "lz4.c"
Include dependency graph for lz4hc.c:

Go to the source code of this file.

Classes

struct  LZ4HC_match_t
 
struct  LZ4HC_optimal_t
 

Macros

#define anchor   (*_anchor)
 
#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 ip   (*_ip)
 
#define LZ4_COMMONDEFS_ONLY
 
#define LZ4_HC_STATIC_LINKING_ONLY
 
#define LZ4_OPT_NUM   (1<<12)
 
#define LZ4HC_HEAPMODE   1
 
#define LZ4HC_rotl32(x, r)   ((x << r) | (x >> (32 - r)))
 
#define MAX(a, b)   ( (a) > (b) ? (a) : (b) )
 
#define MIN(a, b)   ( (a) < (b) ? (a) : (b) )
 
#define op   (*_op)
 
#define OPTIMAL_ML   (int)((ML_MASK-1)+MINMATCH)
 
#define TRAILING_LITERALS   3
 
#define UPDATABLE(ip, op, anchor)   &ip, &op, &anchor
 

Enumerations

enum  dictCtx_directive { noDictCtx, usingDictCtxHc }
 
enum  HCfavor_e { favorCompressionRatio =0, favorDecompressionSpeed }
 
enum  repeat_state_e { rep_untested, rep_not, rep_confirmed }
 

Functions

void LZ4_attach_HC_dictionary (LZ4_streamHC_t *working_stream, const LZ4_streamHC_t *dictionary_stream)
 
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 *state, 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_compress_HC_extStateHC_fastReset (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 (const char *inputBuffer)
 
LZ4_streamHC_tLZ4_createStreamHC (void)
 
void LZ4_favorDecompressionSpeed (LZ4_streamHC_t *LZ4_streamHCPtr, int favor)
 
int LZ4_freeHC (void *LZ4HC_Data)
 
int LZ4_freeStreamHC (LZ4_streamHC_t *LZ4_streamHCPtr)
 
LZ4_streamHC_tLZ4_initStreamHC (void *buffer, size_t size)
 
int LZ4_loadDictHC (LZ4_streamHC_t *LZ4_streamHCPtr, const char *dictionary, int dictSize)
 
void LZ4_resetStreamHC (LZ4_streamHC_t *LZ4_streamHCPtr, int compressionLevel)
 
void LZ4_resetStreamHC_fast (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)
 
void LZ4_setCompressionLevel (LZ4_streamHC_t *LZ4_streamHCPtr, int compressionLevel)
 
int LZ4_sizeofStateHC (void)
 
int LZ4_sizeofStreamStateHC (void)
 
char * LZ4_slideInputBufferHC (void *LZ4HC_Data)
 
static size_t LZ4_streamHC_t_alignment (void)
 
static void LZ4HC_clearTables (LZ4HC_CCtx_internal *hc4)
 
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_generic_dictCtx (LZ4HC_CCtx_internal *const ctx, const char *const src, char *const dst, int *const srcSizePtr, int const dstCapacity, int cLevel, limitedOutput_directive limit)
 
LZ4_FORCE_INLINE int LZ4HC_compress_generic_internal (LZ4HC_CCtx_internal *const ctx, const char *const src, char *const dst, int *const srcSizePtr, int const dstCapacity, int cLevel, const limitedOutput_directive limit, const dictCtx_directive dict)
 
static int LZ4HC_compress_generic_noDictCtx (LZ4HC_CCtx_internal *const ctx, const char *const src, char *const dst, int *const srcSizePtr, int const dstCapacity, int cLevel, limitedOutput_directive limit)
 
LZ4_FORCE_INLINE int LZ4HC_compress_hashChain (LZ4HC_CCtx_internal *const ctx, const char *const source, char *const dest, int *srcSizePtr, int const maxOutputSize, int maxNbAttempts, const limitedOutput_directive limit, const dictCtx_directive dict)
 
static int LZ4HC_compress_optimal (LZ4HC_CCtx_internal *ctx, const char *const source, char *dst, int *srcSizePtr, int dstCapacity, int const nbSearches, size_t sufficient_len, const limitedOutput_directive limit, int const fullUpdate, const dictCtx_directive dict, const HCfavor_e favorDecSpeed)
 
LZ4_FORCE_INLINE int LZ4HC_countBack (const BYTE *const ip, const BYTE *const match, const BYTE *const iMin, const BYTE *const mMin)
 
static unsigned LZ4HC_countPattern (const BYTE *ip, const BYTE *const iEnd, U32 const pattern32)
 
LZ4_FORCE_INLINE int LZ4HC_encodeSequence (const BYTE **_ip, BYTE **_op, const BYTE **_anchor, int matchLength, const BYTE *const match, limitedOutput_directive limit, BYTE *oend)
 
LZ4_FORCE_INLINE LZ4HC_match_t LZ4HC_FindLongerMatch (LZ4HC_CCtx_internal *const ctx, const BYTE *ip, const BYTE *const iHighLimit, int minLen, int nbSearches, const dictCtx_directive dict, const HCfavor_e favorDecSpeed)
 
static U32 LZ4HC_hashPtr (const void *ptr)
 
static void LZ4HC_init_internal (LZ4HC_CCtx_internal *hc4, const BYTE *start)
 
LZ4_FORCE_INLINE void LZ4HC_Insert (LZ4HC_CCtx_internal *hc4, const BYTE *ip)
 
LZ4_FORCE_INLINE int LZ4HC_InsertAndFindBestMatch (LZ4HC_CCtx_internal *const hc4, const BYTE *const ip, const BYTE *const iLimit, const BYTE **matchpos, const int maxNbAttempts, const int patternAnalysis, const dictCtx_directive dict)
 
LZ4_FORCE_INLINE int LZ4HC_InsertAndGetWiderMatch (LZ4HC_CCtx_internal *const hc4, const BYTE *const ip, const BYTE *const iLowLimit, const BYTE *const iHighLimit, int longest, const BYTE **matchpos, const BYTE **startpos, const int maxNbAttempts, const int patternAnalysis, const int chainSwap, const dictCtx_directive dict, const HCfavor_e favorDecSpeed)
 
LZ4_FORCE_INLINE int LZ4HC_literalsPrice (int const litlen)
 
static int LZ4HC_protectDictEnd (U32 const dictLimit, U32 const matchIndex)
 
static unsigned LZ4HC_reverseCountPattern (const BYTE *ip, const BYTE *const iLow, U32 pattern)
 
static U32 LZ4HC_rotatePattern (size_t const rotate, U32 const pattern)
 
LZ4_FORCE_INLINE int LZ4HC_sequencePrice (int litlen, int mlen)
 
static void LZ4HC_setExternalDict (LZ4HC_CCtx_internal *ctxPtr, const BYTE *newBlock)
 

Macro Definition Documentation

◆ anchor

#define anchor   (*_anchor)

◆ DELTANEXTMAXD

#define DELTANEXTMAXD (   p)    chainTable[(p) & LZ4HC_MAXD_MASK] /* flexible, LZ4HC_MAXD dependent */

Definition at line 83 of file lz4hc.c.

◆ DELTANEXTU16

#define DELTANEXTU16 (   table,
  pos 
)    table[(U16)(pos)] /* faster */

Definition at line 84 of file lz4hc.c.

◆ HASH_FUNCTION

#define HASH_FUNCTION (   i)    (((i) * 2654435761U) >> ((MINMATCH*8)-LZ4HC_HASH_LOG))

Definition at line 82 of file lz4hc.c.

◆ ip

#define ip   (*_ip)

◆ LZ4_COMMONDEFS_ONLY

#define LZ4_COMMONDEFS_ONLY

Definition at line 64 of file lz4hc.c.

◆ LZ4_HC_STATIC_LINKING_ONLY

#define LZ4_HC_STATIC_LINKING_ONLY

Definition at line 52 of file lz4hc.c.

◆ LZ4_OPT_NUM

#define LZ4_OPT_NUM   (1<<12)

Definition at line 76 of file lz4hc.c.

◆ LZ4HC_HEAPMODE

#define LZ4HC_HEAPMODE   1

HEAPMODE : Select how default compression function will allocate workplace memory, in stack (0:fastest), or in heap (1:requires malloc()). Since workplace is rather large, heap mode is recommended.

Definition at line 47 of file lz4hc.c.

◆ LZ4HC_rotl32

#define LZ4HC_rotl32 (   x,
 
)    ((x << r) | (x >> (32 - r)))

Definition at line 163 of file lz4hc.c.

◆ MAX

#define MAX (   a,
 
)    ( (a) > (b) ? (a) : (b) )

Definition at line 81 of file lz4hc.c.

◆ MIN

#define MIN (   a,
 
)    ( (a) < (b) ? (a) : (b) )

Definition at line 80 of file lz4hc.c.

◆ op

#define op   (*_op)

◆ OPTIMAL_ML

#define OPTIMAL_ML   (int)((ML_MASK-1)+MINMATCH)

Definition at line 75 of file lz4hc.c.

◆ TRAILING_LITERALS

#define TRAILING_LITERALS   3

◆ UPDATABLE

#define UPDATABLE (   ip,
  op,
  anchor 
)    &ip, &op, &anchor

Definition at line 86 of file lz4hc.c.

Enumeration Type Documentation

◆ dictCtx_directive

Enumerator
noDictCtx 
usingDictCtxHc 

Definition at line 71 of file lz4hc.c.

◆ HCfavor_e

enum HCfavor_e
Enumerator
favorCompressionRatio 
favorDecompressionSpeed 

Definition at line 237 of file lz4hc.c.

◆ repeat_state_e

Enumerator
rep_untested 
rep_not 
rep_confirmed 

Definition at line 236 of file lz4hc.c.

Function Documentation

◆ LZ4_attach_HC_dictionary()

void LZ4_attach_HC_dictionary ( LZ4_streamHC_t working_stream,
const LZ4_streamHC_t dictionary_stream 
)

Definition at line 1087 of file lz4hc.c.

◆ LZ4_compress_HC()

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 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 : any value between 1 and LZ4HC_CLEVEL_MAX will work. Values > LZ4HC_CLEVEL_MAX behave the same as LZ4HC_CLEVEL_MAX.

Returns
: the number of bytes written into 'dst' or 0 if compression fails.

Definition at line 958 of file lz4hc.c.

◆ LZ4_compress_HC_continue()

int LZ4_compress_HC_continue ( LZ4_streamHC_t LZ4_streamHCPtr,
const char *  src,
char *  dst,
int  srcSize,
int  dstCapacity 
)

Definition at line 1151 of file lz4hc.c.

◆ LZ4_compress_HC_continue_destSize()

int LZ4_compress_HC_continue_destSize ( LZ4_streamHC_t LZ4_streamHCPtr,
const char *  src,
char *  dst,
int *  srcSizePtr,
int  targetDstSize 
)

LZ4_compress_HC_continue_destSize() : v1.9.0+ Similar to LZ4_compress_HC_continue(), but will read as much data as possible from src to fit into targetDstSize budget. Result is provided into 2 parts :

Returns
: the number of bytes written into 'dst' (necessarily <= targetDstSize) or 0 if compression fails. srcSizePtr : on success, *srcSizePtr will be updated to indicate how much bytes were read from src. Note that this function may not consume the entire input.

Definition at line 1159 of file lz4hc.c.

◆ LZ4_compress_HC_destSize()

int LZ4_compress_HC_destSize ( void *  stateHC,
const char *  src,
char *  dst,
int *  srcSizePtr,
int  targetDstSize,
int  compressionLevel 
)

LZ4_compress_HC_destSize() : v1.9.0+ Will compress as much data as possible from src to fit into targetDstSize budget. Result is provided in 2 parts :

Returns
: the number of bytes written into 'dst' (necessarily <= targetDstSize) or 0 if compression fails. srcSizePtr : on success, *srcSizePtr is updated to indicate how much bytes were read from src

Definition at line 976 of file lz4hc.c.

◆ LZ4_compress_HC_extStateHC()

int LZ4_compress_HC_extStateHC ( void *  state,
const char *  src,
char *  dst,
int  srcSize,
int  dstCapacity,
int  compressionLevel 
)

Definition at line 951 of file lz4hc.c.

◆ LZ4_compress_HC_extStateHC_fastReset()

int LZ4_compress_HC_extStateHC_fastReset ( void *  state,
const char *  src,
char *  dst,
int  srcSize,
int  dstCapacity,
int  compressionLevel 
)

Definition at line 939 of file lz4hc.c.

◆ LZ4_compressHC()

int LZ4_compressHC ( const char *  src,
char *  dst,
int  srcSize 
)

Definition at line 1203 of file lz4hc.c.

◆ LZ4_compressHC2()

int LZ4_compressHC2 ( const char *  src,
char *  dst,
int  srcSize,
int  cLevel 
)

Definition at line 1205 of file lz4hc.c.

◆ LZ4_compressHC2_continue()

int LZ4_compressHC2_continue ( void *  LZ4HC_Data,
const char *  src,
char *  dst,
int  srcSize,
int  cLevel 
)

Definition at line 1245 of file lz4hc.c.

◆ LZ4_compressHC2_limitedOutput()

int LZ4_compressHC2_limitedOutput ( const char *  src,
char *  dst,
int  srcSize,
int  maxDstSize,
int  cLevel 
)

Definition at line 1206 of file lz4hc.c.

◆ LZ4_compressHC2_limitedOutput_continue()

int LZ4_compressHC2_limitedOutput_continue ( void *  LZ4HC_Data,
const char *  src,
char *  dst,
int  srcSize,
int  dstCapacity,
int  cLevel 
)

Definition at line 1250 of file lz4hc.c.

◆ LZ4_compressHC2_limitedOutput_withStateHC()

int LZ4_compressHC2_limitedOutput_withStateHC ( void *  state,
const char *  src,
char *  dst,
int  srcSize,
int  maxDstSize,
int  cLevel 
)

Definition at line 1210 of file lz4hc.c.

◆ LZ4_compressHC2_withStateHC()

int LZ4_compressHC2_withStateHC ( void *  state,
const char *  src,
char *  dst,
int  srcSize,
int  cLevel 
)

Definition at line 1209 of file lz4hc.c.

◆ LZ4_compressHC_continue()

int LZ4_compressHC_continue ( LZ4_streamHC_t ctx,
const char *  src,
char *  dst,
int  srcSize 
)

Definition at line 1211 of file lz4hc.c.

◆ LZ4_compressHC_continue_generic()

static int LZ4_compressHC_continue_generic ( LZ4_streamHC_t LZ4_streamHCPtr,
const char *  src,
char *  dst,
int *  srcSizePtr,
int  dstCapacity,
limitedOutput_directive  limit 
)
static

Definition at line 1112 of file lz4hc.c.

◆ LZ4_compressHC_limitedOutput()

int LZ4_compressHC_limitedOutput ( const char *  src,
char *  dst,
int  srcSize,
int  maxDstSize 
)

Definition at line 1204 of file lz4hc.c.

◆ LZ4_compressHC_limitedOutput_continue()

int LZ4_compressHC_limitedOutput_continue ( LZ4_streamHC_t ctx,
const char *  src,
char *  dst,
int  srcSize,
int  maxDstSize 
)

Definition at line 1212 of file lz4hc.c.

◆ LZ4_compressHC_limitedOutput_withStateHC()

int LZ4_compressHC_limitedOutput_withStateHC ( void *  state,
const char *  src,
char *  dst,
int  srcSize,
int  maxDstSize 
)

Definition at line 1208 of file lz4hc.c.

◆ LZ4_compressHC_withStateHC()

int LZ4_compressHC_withStateHC ( void *  state,
const char *  src,
char *  dst,
int  srcSize 
)

Definition at line 1207 of file lz4hc.c.

◆ LZ4_createHC()

void* LZ4_createHC ( const char *  inputBuffer)

Definition at line 1229 of file lz4hc.c.

◆ LZ4_createStreamHC()

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. A same state can be used multiple times consecutively, starting with LZ4_resetStreamHC_fast() to start a new stream of blocks.

Definition at line 992 of file lz4hc.c.

◆ LZ4_favorDecompressionSpeed()

void LZ4_favorDecompressionSpeed ( LZ4_streamHC_t LZ4_streamHCPtr,
int  favor 
)

Definition at line 1059 of file lz4hc.c.

◆ LZ4_freeHC()

int LZ4_freeHC ( void *  LZ4HC_Data)

Definition at line 1237 of file lz4hc.c.

◆ LZ4_freeStreamHC()

int LZ4_freeStreamHC ( LZ4_streamHC_t LZ4_streamHCPtr)

Definition at line 1001 of file lz4hc.c.

◆ LZ4_initStreamHC()

LZ4_streamHC_t* LZ4_initStreamHC ( void *  buffer,
size_t  size 
)

Definition at line 1011 of file lz4hc.c.

◆ LZ4_loadDictHC()

int LZ4_loadDictHC ( LZ4_streamHC_t LZ4_streamHCPtr,
const char *  dictionary,
int  dictSize 
)

Definition at line 1066 of file lz4hc.c.

◆ LZ4_resetStreamHC()

void LZ4_resetStreamHC ( LZ4_streamHC_t LZ4_streamHCPtr,
int  compressionLevel 
)

Definition at line 1027 of file lz4hc.c.

◆ LZ4_resetStreamHC_fast()

void LZ4_resetStreamHC_fast ( LZ4_streamHC_t LZ4_streamHCPtr,
int  compressionLevel 
)

Definition at line 1033 of file lz4hc.c.

◆ LZ4_resetStreamStateHC()

int LZ4_resetStreamStateHC ( void *  state,
char *  inputBuffer 
)

Definition at line 1220 of file lz4hc.c.

◆ LZ4_saveDictHC()

int LZ4_saveDictHC ( LZ4_streamHC_t LZ4_streamHCPtr,
char *  safeBuffer,
int  dictSize 
)

Definition at line 1171 of file lz4hc.c.

◆ LZ4_setCompressionLevel()

void LZ4_setCompressionLevel ( LZ4_streamHC_t LZ4_streamHCPtr,
int  compressionLevel 
)

Definition at line 1051 of file lz4hc.c.

◆ LZ4_sizeofStateHC()

int LZ4_sizeofStateHC ( void  )

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() should do properly).

Definition at line 925 of file lz4hc.c.

◆ LZ4_sizeofStreamStateHC()

int LZ4_sizeofStreamStateHC ( void  )

Definition at line 1216 of file lz4hc.c.

◆ LZ4_slideInputBufferHC()

char* LZ4_slideInputBufferHC ( void *  LZ4HC_Data)

Definition at line 1255 of file lz4hc.c.

◆ LZ4_streamHC_t_alignment()

static size_t LZ4_streamHC_t_alignment ( void  )
static

Definition at line 927 of file lz4hc.c.

◆ LZ4HC_clearTables()

static void LZ4HC_clearTables ( LZ4HC_CCtx_internal hc4)
static

Definition at line 94 of file lz4hc.c.

◆ LZ4HC_compress_generic()

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

Definition at line 907 of file lz4hc.c.

◆ LZ4HC_compress_generic_dictCtx()

static int LZ4HC_compress_generic_dictCtx ( LZ4HC_CCtx_internal *const  ctx,
const char *const  src,
char *const  dst,
int *const  srcSizePtr,
int const  dstCapacity,
int  cLevel,
limitedOutput_directive  limit 
)
static

Definition at line 881 of file lz4hc.c.

◆ LZ4HC_compress_generic_internal()

LZ4_FORCE_INLINE int LZ4HC_compress_generic_internal ( LZ4HC_CCtx_internal *const  ctx,
const char *const  src,
char *const  dst,
int *const  srcSizePtr,
int const  dstCapacity,
int  cLevel,
const limitedOutput_directive  limit,
const dictCtx_directive  dict 
)

Definition at line 800 of file lz4hc.c.

◆ LZ4HC_compress_generic_noDictCtx()

static int LZ4HC_compress_generic_noDictCtx ( LZ4HC_CCtx_internal *const  ctx,
const char *const  src,
char *const  dst,
int *const  srcSizePtr,
int const  dstCapacity,
int  cLevel,
limitedOutput_directive  limit 
)
static

Definition at line 866 of file lz4hc.c.

◆ LZ4HC_compress_hashChain()

LZ4_FORCE_INLINE int LZ4HC_compress_hashChain ( LZ4HC_CCtx_internal *const  ctx,
const char *const  source,
char *const  dest,
int *  srcSizePtr,
int const  maxOutputSize,
int  maxNbAttempts,
const limitedOutput_directive  limit,
const dictCtx_directive  dict 
)

Definition at line 553 of file lz4hc.c.

◆ LZ4HC_compress_optimal()

static int LZ4HC_compress_optimal ( LZ4HC_CCtx_internal ctx,
const char *const  source,
char *  dst,
int *  srcSizePtr,
int  dstCapacity,
int const  nbSearches,
size_t  sufficient_len,
const limitedOutput_directive  limit,
int const  fullUpdate,
const dictCtx_directive  dict,
const HCfavor_e  favorDecSpeed 
)
static

Definition at line 1330 of file lz4hc.c.

◆ LZ4HC_countBack()

LZ4_FORCE_INLINE int LZ4HC_countBack ( const BYTE *const  ip,
const BYTE *const  match,
const BYTE *const  iMin,
const BYTE *const  mMin 
)

LZ4HC_countBack() :

Returns
: negative value, nb of common bytes before ip/match

Definition at line 146 of file lz4hc.c.

◆ LZ4HC_countPattern()

static unsigned LZ4HC_countPattern ( const BYTE ip,
const BYTE *const  iEnd,
U32 const  pattern32 
)
static

Definition at line 177 of file lz4hc.c.

◆ LZ4HC_encodeSequence()

LZ4_FORCE_INLINE int LZ4HC_encodeSequence ( const BYTE **  _ip,
BYTE **  _op,
const BYTE **  _anchor,
int  matchLength,
const BYTE *const  match,
limitedOutput_directive  limit,
BYTE oend 
)

Definition at line 467 of file lz4hc.c.

◆ LZ4HC_FindLongerMatch()

LZ4_FORCE_INLINE LZ4HC_match_t LZ4HC_FindLongerMatch ( LZ4HC_CCtx_internal *const  ctx,
const BYTE ip,
const BYTE *const  iHighLimit,
int  minLen,
int  nbSearches,
const dictCtx_directive  dict,
const HCfavor_e  favorDecSpeed 
)

Definition at line 1308 of file lz4hc.c.

◆ LZ4HC_hashPtr()

static U32 LZ4HC_hashPtr ( const void *  ptr)
static

Definition at line 88 of file lz4hc.c.

◆ LZ4HC_init_internal()

static void LZ4HC_init_internal ( LZ4HC_CCtx_internal hc4,
const BYTE start 
)
static

Definition at line 100 of file lz4hc.c.

◆ LZ4HC_Insert()

LZ4_FORCE_INLINE void LZ4HC_Insert ( LZ4HC_CCtx_internal hc4,
const BYTE ip 
)

Definition at line 120 of file lz4hc.c.

◆ LZ4HC_InsertAndFindBestMatch()

LZ4_FORCE_INLINE int LZ4HC_InsertAndFindBestMatch ( LZ4HC_CCtx_internal *const  hc4,
const BYTE *const  ip,
const BYTE *const  iLimit,
const BYTE **  matchpos,
const int  maxNbAttempts,
const int  patternAnalysis,
const dictCtx_directive  dict 
)

Definition at line 450 of file lz4hc.c.

◆ LZ4HC_InsertAndGetWiderMatch()

LZ4_FORCE_INLINE int LZ4HC_InsertAndGetWiderMatch ( LZ4HC_CCtx_internal *const  hc4,
const BYTE *const  ip,
const BYTE *const  iLowLimit,
const BYTE *const  iHighLimit,
int  longest,
const BYTE **  matchpos,
const BYTE **  startpos,
const int  maxNbAttempts,
const int  patternAnalysis,
const int  chainSwap,
const dictCtx_directive  dict,
const HCfavor_e  favorDecSpeed 
)

Definition at line 240 of file lz4hc.c.

◆ LZ4HC_literalsPrice()

LZ4_FORCE_INLINE int LZ4HC_literalsPrice ( int const  litlen)

Definition at line 1276 of file lz4hc.c.

◆ LZ4HC_protectDictEnd()

static int LZ4HC_protectDictEnd ( U32 const  dictLimit,
U32 const  matchIndex 
)
static

Definition at line 231 of file lz4hc.c.

◆ LZ4HC_reverseCountPattern()

static unsigned LZ4HC_reverseCountPattern ( const BYTE ip,
const BYTE *const  iLow,
U32  pattern 
)
static

Definition at line 210 of file lz4hc.c.

◆ LZ4HC_rotatePattern()

static U32 LZ4HC_rotatePattern ( size_t const  rotate,
U32 const  pattern 
)
static

Definition at line 167 of file lz4hc.c.

◆ LZ4HC_sequencePrice()

LZ4_FORCE_INLINE int LZ4HC_sequencePrice ( int  litlen,
int  mlen 
)

Definition at line 1287 of file lz4hc.c.

◆ LZ4HC_setExternalDict()

static void LZ4HC_setExternalDict ( LZ4HC_CCtx_internal ctxPtr,
const BYTE newBlock 
)
static

Definition at line 1093 of file lz4hc.c.



plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:28