ROOTANA
Data Structures | Macros | Enumerations | Functions | Variables
lz4hc.cxx File Reference
#include "mlz4hc.h"
#include "lz4.cxx"
Include dependency graph for lz4hc.cxx:

Go to the source code of this file.

Data Structures

struct  LZ4HC_Data_Structure
 

Macros

#define MLZ4_COMMONDEFS_ONLY
 
#define DICTIONARY_LOGSIZE   16
 
#define MAXD   (1<<DICTIONARY_LOGSIZE)
 
#define MAXD_MASK   (MAXD - 1)
 
#define HASH_LOG   (DICTIONARY_LOGSIZE-1)
 
#define HASHTABLESIZE   (1 << HASH_LOG)
 
#define HASH_MASK   (HASHTABLESIZE - 1)
 
#define OPTIMAL_ML   (int)((ML_MASK-1)+MINMATCH)
 
#define HASH_FUNCTION(i)   (((i) * 2654435761U) >> ((MINMATCH*8)-HASH_LOG))
 
#define DELTANEXTU16(p)   chainTable[(U16)(p)] /* faster */
 
#define LZ4HC_DEBUG   0
 

Enumerations

enum  limitedOutput_directive { notLimited = 0 , limitedOutput = 1 , noLimit = 0 , limitedOutput = 1 }
 

Functions

static U32 LZ4HC_hashPtr (const void *ptr)
 
static void LZ4HC_init (LZ4HC_Data_Structure *hc4, const BYTE *start)
 
FORCE_INLINE void LZ4HC_Insert (LZ4HC_Data_Structure *hc4, const BYTE *ip)
 
FORCE_INLINE int LZ4HC_InsertAndFindBestMatch (LZ4HC_Data_Structure *hc4, const BYTE *ip, const BYTE *const iLimit, const BYTE **matchpos, const int maxNbAttempts)
 
FORCE_INLINE int LZ4HC_InsertAndGetWiderMatch (LZ4HC_Data_Structure *hc4, const BYTE *const ip, const BYTE *const iLowLimit, const BYTE *const iHighLimit, int longest, const BYTE **matchpos, const BYTE **startpos, const int maxNbAttempts)
 
FORCE_INLINE int LZ4HC_encodeSequence (const BYTE **ip, BYTE **op, const BYTE **anchor, int matchLength, const BYTE *const match, limitedOutput_directive limitedOutputBuffer, BYTE *oend)
 
static int LZ4HC_compress_generic (void *ctxvoid, const char *source, char *dest, int inputSize, int maxOutputSize, int compressionLevel, limitedOutput_directive limit)
 
int MLZ4_sizeofStateHC (void)
 
int MLZ4_compress_HC_extStateHC (void *state, const char *src, char *dst, int srcSize, int maxDstSize, int compressionLevel)
 
int MLZ4_compress_HC (const char *src, char *dst, int srcSize, int maxDstSize, int compressionLevel)
 
MLZ4_streamHC_tMLZ4_createStreamHC (void)
 
int MLZ4_freeStreamHC (MLZ4_streamHC_t *MLZ4_streamHCPtr)
 
void MLZ4_resetStreamHC (MLZ4_streamHC_t *MLZ4_streamHCPtr, int compressionLevel)
 
int MLZ4_loadDictHC (MLZ4_streamHC_t *MLZ4_streamHCPtr, const char *dictionary, int dictSize)
 
static void LZ4HC_setExternalDict (LZ4HC_Data_Structure *ctxPtr, const BYTE *newBlock)
 
static int MLZ4_compressHC_continue_generic (LZ4HC_Data_Structure *ctxPtr, const char *source, char *dest, int inputSize, int maxOutputSize, limitedOutput_directive limit)
 
int MLZ4_compress_HC_continue (MLZ4_streamHC_t *MLZ4_streamHCPtr, const char *source, char *dest, int inputSize, int maxOutputSize)
 
int MLZ4_saveDictHC (MLZ4_streamHC_t *MLZ4_streamHCPtr, char *safeBuffer, int dictSize)
 
int MLZ4_compressHC (const char *src, char *dst, int srcSize)
 
int MLZ4_compressHC_limitedOutput (const char *src, char *dst, int srcSize, int maxDstSize)
 
int MLZ4_compressHC2 (const char *src, char *dst, int srcSize, int cLevel)
 
int MLZ4_compressHC2_limitedOutput (const char *src, char *dst, int srcSize, int maxDstSize, int cLevel)
 
int MLZ4_compressHC_withStateHC (void *state, const char *src, char *dst, int srcSize)
 
int MLZ4_compressHC_limitedOutput_withStateHC (void *state, const char *src, char *dst, int srcSize, int maxDstSize)
 
int MLZ4_compressHC2_withStateHC (void *state, const char *src, char *dst, int srcSize, int cLevel)
 
int MLZ4_compressHC2_limitedOutput_withStateHC (void *state, const char *src, char *dst, int srcSize, int maxDstSize, int cLevel)
 
int MLZ4_compressHC_continue (MLZ4_streamHC_t *ctx, const char *src, char *dst, int srcSize)
 
int MLZ4_compressHC_limitedOutput_continue (MLZ4_streamHC_t *ctx, const char *src, char *dst, int srcSize, int maxDstSize)
 
int MLZ4_sizeofStreamStateHC (void)
 
int MLZ4_resetStreamStateHC (void *state, char *inputBuffer)
 
void * MLZ4_createHC (char *inputBuffer)
 
int MLZ4_freeHC (void *LZ4HC_Data)
 
int MLZ4_compressHC2_continue (void *LZ4HC_Data, const char *source, char *dest, int inputSize, int compressionLevel)
 
int MLZ4_compressHC2_limitedOutput_continue (void *LZ4HC_Data, const char *source, char *dest, int inputSize, int maxOutputSize, int compressionLevel)
 
char * MLZ4_slideInputBufferHC (void *LZ4HC_Data)
 

Variables

static const int LZ4HC_compressionLevel_default = 9
 
static const int g_maxCompressionLevel = 16
 

Macro Definition Documentation

◆ DELTANEXTU16

#define DELTANEXTU16 (   p)    chainTable[(U16)(p)] /* faster */

Definition at line 107 of file lz4hc.cxx.

◆ DICTIONARY_LOGSIZE

#define DICTIONARY_LOGSIZE   16

Definition at line 71 of file lz4hc.cxx.

◆ HASH_FUNCTION

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

Definition at line 105 of file lz4hc.cxx.

◆ HASH_LOG

#define HASH_LOG   (DICTIONARY_LOGSIZE-1)

Definition at line 75 of file lz4hc.cxx.

◆ HASH_MASK

#define HASH_MASK   (HASHTABLESIZE - 1)

Definition at line 77 of file lz4hc.cxx.

◆ HASHTABLESIZE

#define HASHTABLESIZE   (1 << HASH_LOG)

Definition at line 76 of file lz4hc.cxx.

◆ LZ4HC_DEBUG

#define LZ4HC_DEBUG   0

Definition at line 285 of file lz4hc.cxx.

◆ MAXD

#define MAXD   (1<<DICTIONARY_LOGSIZE)

Definition at line 72 of file lz4hc.cxx.

◆ MAXD_MASK

#define MAXD_MASK   (MAXD - 1)

Definition at line 73 of file lz4hc.cxx.

◆ MLZ4_COMMONDEFS_ONLY

#define MLZ4_COMMONDEFS_ONLY

Definition at line 64 of file lz4hc.cxx.

◆ OPTIMAL_ML

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

Definition at line 79 of file lz4hc.cxx.

Enumeration Type Documentation

◆ limitedOutput_directive

Enumerator
notLimited 
limitedOutput 
noLimit 
limitedOutput 

Definition at line 283 of file lz4hc.cxx.

Function Documentation

◆ LZ4HC_compress_generic()

static int LZ4HC_compress_generic ( void *  ctxvoid,
const char *  source,
char *  dest,
int  inputSize,
int  maxOutputSize,
int  compressionLevel,
limitedOutput_directive  limit 
)
static

Definition at line 334 of file lz4hc.cxx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LZ4HC_encodeSequence()

FORCE_INLINE int LZ4HC_encodeSequence ( const BYTE **  ip,
BYTE **  op,
const BYTE **  anchor,
int  matchLength,
const BYTE *const  match,
limitedOutput_directive  limitedOutputBuffer,
BYTE oend 
)

Definition at line 290 of file lz4hc.cxx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LZ4HC_hashPtr()

static U32 LZ4HC_hashPtr ( const void *  ptr)
static

Definition at line 109 of file lz4hc.cxx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LZ4HC_init()

static void LZ4HC_init ( LZ4HC_Data_Structure hc4,
const BYTE start 
)
static

Definition at line 116 of file lz4hc.cxx.

Here is the caller graph for this function:

◆ LZ4HC_Insert()

FORCE_INLINE void LZ4HC_Insert ( LZ4HC_Data_Structure hc4,
const BYTE ip 
)

Definition at line 130 of file lz4hc.cxx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LZ4HC_InsertAndFindBestMatch()

FORCE_INLINE int LZ4HC_InsertAndFindBestMatch ( LZ4HC_Data_Structure hc4,
const BYTE ip,
const BYTE *const  iLimit,
const BYTE **  matchpos,
const int  maxNbAttempts 
)

Definition at line 152 of file lz4hc.cxx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LZ4HC_InsertAndGetWiderMatch()

FORCE_INLINE int LZ4HC_InsertAndGetWiderMatch ( LZ4HC_Data_Structure hc4,
const BYTE *const  ip,
const BYTE *const  iLowLimit,
const BYTE *const  iHighLimit,
int  longest,
const BYTE **  matchpos,
const BYTE **  startpos,
const int  maxNbAttempts 
)

Definition at line 206 of file lz4hc.cxx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LZ4HC_setExternalDict()

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

Definition at line 591 of file lz4hc.cxx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MLZ4_compress_HC()

int MLZ4_compress_HC ( const char *  src,
char *  dst,
int  srcSize,
int  maxDstSize,
int  compressionLevel 
)

Definition at line 550 of file lz4hc.cxx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MLZ4_compress_HC_continue()

int MLZ4_compress_HC_continue ( MLZ4_streamHC_t MLZ4_streamHCPtr,
const char *  source,
char *  dest,
int  inputSize,
int  maxOutputSize 
)

Definition at line 641 of file lz4hc.cxx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MLZ4_compress_HC_extStateHC()

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

Definition at line 540 of file lz4hc.cxx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MLZ4_compressHC()

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

Definition at line 677 of file lz4hc.cxx.

Here is the call graph for this function:

◆ MLZ4_compressHC2()

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

Definition at line 679 of file lz4hc.cxx.

Here is the call graph for this function:

◆ MLZ4_compressHC2_continue()

int MLZ4_compressHC2_continue ( void *  LZ4HC_Data,
const char *  source,
char *  dest,
int  inputSize,
int  compressionLevel 
)

Definition at line 716 of file lz4hc.cxx.

Here is the call graph for this function:

◆ MLZ4_compressHC2_limitedOutput()

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

Definition at line 680 of file lz4hc.cxx.

Here is the call graph for this function:

◆ MLZ4_compressHC2_limitedOutput_continue()

int MLZ4_compressHC2_limitedOutput_continue ( void *  LZ4HC_Data,
const char *  source,
char *  dest,
int  inputSize,
int  maxOutputSize,
int  compressionLevel 
)

Definition at line 721 of file lz4hc.cxx.

Here is the call graph for this function:

◆ MLZ4_compressHC2_limitedOutput_withStateHC()

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

Definition at line 684 of file lz4hc.cxx.

Here is the call graph for this function:

◆ MLZ4_compressHC2_withStateHC()

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

Definition at line 683 of file lz4hc.cxx.

Here is the call graph for this function:

◆ MLZ4_compressHC_continue()

int MLZ4_compressHC_continue ( MLZ4_streamHC_t ctx,
const char *  src,
char *  dst,
int  srcSize 
)

Definition at line 685 of file lz4hc.cxx.

Here is the call graph for this function:

◆ MLZ4_compressHC_continue_generic()

static int MLZ4_compressHC_continue_generic ( LZ4HC_Data_Structure ctxPtr,
const char *  source,
char *  dest,
int  inputSize,
int  maxOutputSize,
limitedOutput_directive  limit 
)
static

Definition at line 604 of file lz4hc.cxx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MLZ4_compressHC_limitedOutput()

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

Definition at line 678 of file lz4hc.cxx.

Here is the call graph for this function:

◆ MLZ4_compressHC_limitedOutput_continue()

int MLZ4_compressHC_limitedOutput_continue ( MLZ4_streamHC_t ctx,
const char *  src,
char *  dst,
int  srcSize,
int  maxDstSize 
)

Definition at line 686 of file lz4hc.cxx.

Here is the call graph for this function:

◆ MLZ4_compressHC_limitedOutput_withStateHC()

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

Definition at line 682 of file lz4hc.cxx.

Here is the call graph for this function:

◆ MLZ4_compressHC_withStateHC()

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

Definition at line 681 of file lz4hc.cxx.

Here is the call graph for this function:

◆ MLZ4_createHC()

void* MLZ4_createHC ( char *  inputBuffer)

Definition at line 701 of file lz4hc.cxx.

Here is the call graph for this function:

◆ MLZ4_createStreamHC()

MLZ4_streamHC_t* MLZ4_createStreamHC ( void  )

Definition at line 562 of file lz4hc.cxx.

Here is the caller graph for this function:

◆ MLZ4_freeHC()

int MLZ4_freeHC ( void *  LZ4HC_Data)

Definition at line 710 of file lz4hc.cxx.

◆ MLZ4_freeStreamHC()

int MLZ4_freeStreamHC ( MLZ4_streamHC_t MLZ4_streamHCPtr)

Definition at line 563 of file lz4hc.cxx.

◆ MLZ4_loadDictHC()

int MLZ4_loadDictHC ( MLZ4_streamHC_t MLZ4_streamHCPtr,
const char *  dictionary,
int  dictSize 
)

Definition at line 574 of file lz4hc.cxx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MLZ4_resetStreamHC()

void MLZ4_resetStreamHC ( MLZ4_streamHC_t MLZ4_streamHCPtr,
int  compressionLevel 
)

Definition at line 567 of file lz4hc.cxx.

Here is the caller graph for this function:

◆ MLZ4_resetStreamStateHC()

int MLZ4_resetStreamStateHC ( void *  state,
char *  inputBuffer 
)

Definition at line 693 of file lz4hc.cxx.

Here is the call graph for this function:

◆ MLZ4_saveDictHC()

int MLZ4_saveDictHC ( MLZ4_streamHC_t MLZ4_streamHCPtr,
char *  safeBuffer,
int  dictSize 
)

Definition at line 652 of file lz4hc.cxx.

Here is the caller graph for this function:

◆ MLZ4_sizeofStateHC()

int MLZ4_sizeofStateHC ( void  )

Definition at line 538 of file lz4hc.cxx.

◆ MLZ4_sizeofStreamStateHC()

int MLZ4_sizeofStreamStateHC ( void  )

Definition at line 691 of file lz4hc.cxx.

◆ MLZ4_slideInputBufferHC()

char* MLZ4_slideInputBufferHC ( void *  LZ4HC_Data)

Definition at line 726 of file lz4hc.cxx.

Here is the call graph for this function:

Variable Documentation

◆ g_maxCompressionLevel

const int g_maxCompressionLevel = 16
static

Definition at line 81 of file lz4hc.cxx.

◆ LZ4HC_compressionLevel_default

const int LZ4HC_compressionLevel_default = 9
static

Definition at line 40 of file lz4hc.cxx.