NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros | Enumerations | Functions
lz4hc.c File Reference
#include "lz4hc.h"
#include "lz4.c"

Go to the source code of this file.

Classes

struct  LZ4HC_Data_Structure
 

Macros

#define LZ4_COMMONDEFS_ONLY
 
#define DICTIONARY_LOGSIZE   16
 
#define MAXD   (1<<DICTIONARY_LOGSIZE)
 
#define MAXD_MASK   ((U32)(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 DELTANEXT(p)   chainTable[(size_t)(p) & MAXD_MASK]
 
#define GETNEXT(p)   ((p) - (size_t)DELTANEXT(p))
 
#define LZ4HC_DEBUG   0
 

Enumerations

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

Functions

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 *ip, const BYTE *iLowLimit, const BYTE *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)
 
int LZ4_compressHC2 (const char *source, char *dest, int inputSize, int compressionLevel)
 
int LZ4_compressHC (const char *source, char *dest, int inputSize)
 
int LZ4_compressHC2_limitedOutput (const char *source, char *dest, int inputSize, int maxOutputSize, int compressionLevel)
 
int LZ4_compressHC_limitedOutput (const char *source, char *dest, int inputSize, int maxOutputSize)
 
int LZ4_sizeofStateHC (void)
 
int LZ4_compressHC2_withStateHC (void *state, const char *source, char *dest, int inputSize, int compressionLevel)
 
int LZ4_compressHC_withStateHC (void *state, const char *source, char *dest, int inputSize)
 
int LZ4_compressHC2_limitedOutput_withStateHC (void *state, const char *source, char *dest, int inputSize, int maxOutputSize, int compressionLevel)
 
int LZ4_compressHC_limitedOutput_withStateHC (void *state, const char *source, char *dest, int inputSize, int maxOutputSize)
 
LZ4_streamHC_tLZ4_createStreamHC (void)
 
int LZ4_freeStreamHC (LZ4_streamHC_t *LZ4_streamHCPtr)
 
void LZ4_resetStreamHC (LZ4_streamHC_t *LZ4_streamHCPtr, int compressionLevel)
 
int LZ4_loadDictHC (LZ4_streamHC_t *LZ4_streamHCPtr, const char *dictionary, int dictSize)
 
int LZ4_compressHC_continue (LZ4_streamHC_t *LZ4_streamHCPtr, const char *source, char *dest, int inputSize)
 
int LZ4_compressHC_limitedOutput_continue (LZ4_streamHC_t *LZ4_streamHCPtr, const char *source, char *dest, int inputSize, int maxOutputSize)
 
int LZ4_saveDictHC (LZ4_streamHC_t *LZ4_streamHCPtr, char *safeBuffer, int dictSize)
 
int LZ4_sizeofStreamStateHC (void)
 
int LZ4_resetStreamStateHC (void *state, const char *inputBuffer)
 
void * LZ4_createHC (const char *inputBuffer)
 
int LZ4_freeHC (void *LZ4HC_Data)
 
int LZ4_compressHC2_continue (void *LZ4HC_Data, const char *source, char *dest, int inputSize, int compressionLevel)
 
int LZ4_compressHC2_limitedOutput_continue (void *LZ4HC_Data, const char *source, char *dest, int inputSize, int maxOutputSize, int compressionLevel)
 
char * LZ4_slideInputBufferHC (void *LZ4HC_Data)
 

Macro Definition Documentation

#define DELTANEXT (   p)    chainTable[(size_t)(p) & MAXD_MASK]

Definition at line 105 of file lz4hc.c.

#define DICTIONARY_LOGSIZE   16

Definition at line 70 of file lz4hc.c.

#define GETNEXT (   p)    ((p) - (size_t)DELTANEXT(p))

Definition at line 106 of file lz4hc.c.

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

Definition at line 104 of file lz4hc.c.

#define HASH_LOG   (DICTIONARY_LOGSIZE-1)

Definition at line 74 of file lz4hc.c.

#define HASH_MASK   (HASHTABLESIZE - 1)

Definition at line 76 of file lz4hc.c.

#define HASHTABLESIZE   (1 << HASH_LOG)

Definition at line 75 of file lz4hc.c.

#define LZ4_COMMONDEFS_ONLY

Definition at line 63 of file lz4hc.c.

#define LZ4HC_DEBUG   0

Definition at line 281 of file lz4hc.c.

#define MAXD   (1<<DICTIONARY_LOGSIZE)

Definition at line 71 of file lz4hc.c.

#define MAXD_MASK   ((U32)(MAXD - 1))

Definition at line 72 of file lz4hc.c.

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

Definition at line 78 of file lz4hc.c.

Enumeration Type Documentation

Enumerator
notLimited 
limitedOutput 
noLimit 
limitedOutput 

Definition at line 279 of file lz4hc.c.

Function Documentation

int LZ4_compressHC ( const char *  source,
char *  dest,
int  inputSize 
)

Definition at line 541 of file lz4hc.c.

int LZ4_compressHC2 ( const char *  source,
char *  dest,
int  inputSize,
int  compressionLevel 
)

Definition at line 534 of file lz4hc.c.

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

Definition at line 736 of file lz4hc.c.

int LZ4_compressHC2_limitedOutput ( const char *  source,
char *  dest,
int  inputSize,
int  maxOutputSize,
int  compressionLevel 
)

Definition at line 543 of file lz4hc.c.

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

Definition at line 741 of file lz4hc.c.

int LZ4_compressHC2_limitedOutput_withStateHC ( void *  state,
const char *  source,
char *  dest,
int  inputSize,
int  maxOutputSize,
int  compressionLevel 
)

Definition at line 573 of file lz4hc.c.

int LZ4_compressHC2_withStateHC ( void *  state,
const char *  source,
char *  dest,
int  inputSize,
int  compressionLevel 
)

Definition at line 562 of file lz4hc.c.

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

Definition at line 667 of file lz4hc.c.

int LZ4_compressHC_limitedOutput ( const char *  source,
char *  dest,
int  inputSize,
int  maxOutputSize 
)

Definition at line 550 of file lz4hc.c.

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

Definition at line 672 of file lz4hc.c.

int LZ4_compressHC_limitedOutput_withStateHC ( void *  state,
const char *  source,
char *  dest,
int  inputSize,
int  maxOutputSize 
)

Definition at line 580 of file lz4hc.c.

int LZ4_compressHC_withStateHC ( void *  state,
const char *  source,
char *  dest,
int  inputSize 
)

Definition at line 569 of file lz4hc.c.

void* LZ4_createHC ( const char *  inputBuffer)

Definition at line 712 of file lz4hc.c.

LZ4_streamHC_t* LZ4_createStreamHC ( void  )

Definition at line 589 of file lz4hc.c.

int LZ4_freeHC ( void *  LZ4HC_Data)

Definition at line 719 of file lz4hc.c.

int LZ4_freeStreamHC ( LZ4_streamHC_t LZ4_streamHCPtr)

Definition at line 590 of file lz4hc.c.

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

Definition at line 601 of file lz4hc.c.

void LZ4_resetStreamHC ( LZ4_streamHC_t LZ4_streamHCPtr,
int  compressionLevel 
)

Definition at line 594 of file lz4hc.c.

int LZ4_resetStreamStateHC ( void *  state,
const char *  inputBuffer 
)

Definition at line 705 of file lz4hc.c.

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

Definition at line 680 of file lz4hc.c.

int LZ4_sizeofStateHC ( void  )

Definition at line 559 of file lz4hc.c.

int LZ4_sizeofStreamStateHC ( void  )

Definition at line 703 of file lz4hc.c.

char* LZ4_slideInputBufferHC ( void *  LZ4HC_Data)

Definition at line 746 of file lz4hc.c.

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 286 of file lz4hc.c.

FORCE_INLINE void LZ4HC_Insert ( LZ4HC_Data_Structure hc4,
const BYTE ip 
)

Definition at line 130 of file lz4hc.c.

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.

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

Definition at line 206 of file lz4hc.c.