Classes | Macros | Enumerations | Functions | Variables
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_Data_Structure
 

Macros

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

Enumerations

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

Functions

int LZ4_compress_HC (const char *src, char *dst, int srcSize, int maxDstSize, int compressionLevel)
 
int LZ4_compress_HC_continue (LZ4_streamHC_t *LZ4_streamHCPtr, const char *source, char *dest, int inputSize, int maxOutputSize)
 
int LZ4_compress_HC_extStateHC (void *state, const char *src, char *dst, int srcSize, int maxDstSize, 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 *source, char *dest, int inputSize, int compressionLevel)
 
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 *source, char *dest, int inputSize, int maxOutputSize, int compressionLevel)
 
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 (LZ4HC_Data_Structure *ctxPtr, const char *source, char *dest, int inputSize, int maxOutputSize, 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_tLZ4_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 (void *ctxvoid, const char *source, char *dest, int inputSize, int maxOutputSize, int compressionLevel, limitedOutput_directive limit)
 
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 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)
 
static void LZ4HC_setExternalDict (LZ4HC_Data_Structure *ctxPtr, const BYTE *newBlock)
 

Variables

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

Macro Definition Documentation

◆ DELTANEXTU16

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

Definition at line 107 of file lz4hc.c.

◆ DICTIONARY_LOGSIZE

#define DICTIONARY_LOGSIZE   16

Definition at line 71 of file lz4hc.c.

◆ HASH_FUNCTION

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

Definition at line 105 of file lz4hc.c.

◆ HASH_LOG

#define HASH_LOG   (DICTIONARY_LOGSIZE-1)

Definition at line 75 of file lz4hc.c.

◆ HASH_MASK

#define HASH_MASK   (HASHTABLESIZE - 1)

Definition at line 77 of file lz4hc.c.

◆ HASHTABLESIZE

#define HASHTABLESIZE   (1 << HASH_LOG)

Definition at line 76 of file lz4hc.c.

◆ LZ4_COMMONDEFS_ONLY

#define LZ4_COMMONDEFS_ONLY

Definition at line 64 of file lz4hc.c.

◆ LZ4HC_DEBUG

#define LZ4HC_DEBUG   0

Definition at line 285 of file lz4hc.c.

◆ MAXD

#define MAXD   (1<<DICTIONARY_LOGSIZE)

Definition at line 72 of file lz4hc.c.

◆ MAXD_MASK

#define MAXD_MASK   (MAXD - 1)

Definition at line 73 of file lz4hc.c.

◆ OPTIMAL_ML

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

Definition at line 79 of file lz4hc.c.

Enumeration Type Documentation

◆ limitedOutput_directive

Enumerator
notLimited 
limitedOutput 
noLimit 
limitedOutput 

Definition at line 283 of file lz4hc.c.

Function Documentation

◆ LZ4_compress_HC()

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

Definition at line 550 of file lz4hc.c.

◆ LZ4_compress_HC_continue()

int LZ4_compress_HC_continue ( LZ4_streamHC_t LZ4_streamHCPtr,
const char *  source,
char *  dest,
int  inputSize,
int  maxOutputSize 
)

Definition at line 641 of file lz4hc.c.

◆ LZ4_compress_HC_extStateHC()

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

Definition at line 540 of file lz4hc.c.

◆ LZ4_compressHC()

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

Definition at line 677 of file lz4hc.c.

◆ LZ4_compressHC2()

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

Definition at line 679 of file lz4hc.c.

◆ LZ4_compressHC2_continue()

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

Definition at line 716 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 680 of file lz4hc.c.

◆ LZ4_compressHC2_limitedOutput_continue()

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

Definition at line 721 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 684 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 683 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 685 of file lz4hc.c.

◆ LZ4_compressHC_continue_generic()

static int LZ4_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.c.

◆ LZ4_compressHC_limitedOutput()

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

Definition at line 678 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 686 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 682 of file lz4hc.c.

◆ LZ4_compressHC_withStateHC()

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

Definition at line 681 of file lz4hc.c.

◆ LZ4_createHC()

void* LZ4_createHC ( char *  inputBuffer)

Definition at line 701 of file lz4hc.c.

◆ LZ4_createStreamHC()

LZ4_streamHC_t* LZ4_createStreamHC ( void  )

Definition at line 562 of file lz4hc.c.

◆ LZ4_freeHC()

int LZ4_freeHC ( void *  LZ4HC_Data)

Definition at line 710 of file lz4hc.c.

◆ LZ4_freeStreamHC()

int LZ4_freeStreamHC ( LZ4_streamHC_t LZ4_streamHCPtr)

Definition at line 563 of file lz4hc.c.

◆ LZ4_loadDictHC()

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

Definition at line 574 of file lz4hc.c.

◆ LZ4_resetStreamHC()

void LZ4_resetStreamHC ( LZ4_streamHC_t LZ4_streamHCPtr,
int  compressionLevel 
)

Definition at line 567 of file lz4hc.c.

◆ LZ4_resetStreamStateHC()

int LZ4_resetStreamStateHC ( void *  state,
char *  inputBuffer 
)

Definition at line 693 of file lz4hc.c.

◆ LZ4_saveDictHC()

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

Definition at line 652 of file lz4hc.c.

◆ LZ4_sizeofStateHC()

int LZ4_sizeofStateHC ( void  )

Definition at line 538 of file lz4hc.c.

◆ LZ4_sizeofStreamStateHC()

int LZ4_sizeofStreamStateHC ( void  )

Definition at line 691 of file lz4hc.c.

◆ LZ4_slideInputBufferHC()

char* LZ4_slideInputBufferHC ( void *  LZ4HC_Data)

Definition at line 726 of file lz4hc.c.

◆ 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.c.

◆ 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.c.

◆ LZ4HC_hashPtr()

static U32 LZ4HC_hashPtr ( const void *  ptr)
static

Definition at line 109 of file lz4hc.c.

◆ LZ4HC_init()

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

Definition at line 116 of file lz4hc.c.

◆ LZ4HC_Insert()

FORCE_INLINE void LZ4HC_Insert ( LZ4HC_Data_Structure hc4,
const BYTE ip 
)

Definition at line 130 of file lz4hc.c.

◆ 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.c.

◆ 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.c.

◆ LZ4HC_setExternalDict()

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

Definition at line 591 of file lz4hc.c.

Variable Documentation

◆ g_maxCompressionLevel

const int g_maxCompressionLevel = 16
static

Definition at line 81 of file lz4hc.c.

◆ LZ4HC_compressionLevel_default

const int LZ4HC_compressionLevel_default = 9
static

Definition at line 40 of file lz4hc.c.



rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:24