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

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)
 
voidLZ4_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 (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)
 

Macro Definition Documentation

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

Definition at line 73 of file lz4hc.c.

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

Definition at line 74 of file lz4hc.c.

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

Definition at line 72 of file lz4hc.c.

#define LZ4_COMMONDEFS_ONLY

Definition at line 63 of file lz4hc.c.

#define LZ4HC_DEBUG   0

Definition at line 243 of file lz4hc.c.

#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.

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

Definition at line 68 of file lz4hc.c.

Enumeration Type Documentation

Enumerator
notLimited 
limitedOutput 
noLimit 
limitedOutput 
limitedDestSize 

Definition at line 236 of file lz4hc.c.

Function Documentation

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.

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

Definition at line 581 of file lz4hc.c.

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

Definition at line 694 of file lz4hc.c.

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

Definition at line 702 of file lz4hc.c.

int LZ4_compress_HC_destSize ( void LZ4HC_Data,
const char *  source,
char *  dest,
int *  sourceSizePtr,
int  targetDestSize,
int  cLevel 
)

Definition at line 599 of file lz4hc.c.

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).

Definition at line 570 of file lz4hc.c.

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

Definition at line 737 of file lz4hc.c.

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

Definition at line 739 of file lz4hc.c.

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

Definition at line 772 of file lz4hc.c.

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

Definition at line 740 of file lz4hc.c.

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

Definition at line 777 of file lz4hc.c.

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

Definition at line 744 of file lz4hc.c.

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

Definition at line 743 of file lz4hc.c.

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

Definition at line 745 of file lz4hc.c.

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

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

Definition at line 738 of file lz4hc.c.

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

Definition at line 746 of file lz4hc.c.

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

Definition at line 742 of file lz4hc.c.

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

Definition at line 741 of file lz4hc.c.

void* LZ4_createHC ( char *  inputBuffer)

Definition at line 761 of file lz4hc.c.

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.

Definition at line 612 of file lz4hc.c.

int LZ4_freeHC ( void LZ4HC_Data)

Definition at line 770 of file lz4hc.c.

int LZ4_freeStreamHC ( LZ4_streamHC_t LZ4_streamHCPtr)

Definition at line 613 of file lz4hc.c.

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

Definition at line 626 of file lz4hc.c.

void LZ4_resetStreamHC ( LZ4_streamHC_t LZ4_streamHCPtr,
int  compressionLevel 
)

Definition at line 617 of file lz4hc.c.

int LZ4_resetStreamStateHC ( void state,
char *  inputBuffer 
)

Definition at line 752 of file lz4hc.c.

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

Definition at line 713 of file lz4hc.c.

int LZ4_sizeofStateHC ( void  )

Definition at line 568 of file lz4hc.c.

int LZ4_sizeofStreamStateHC ( void  )

Definition at line 750 of file lz4hc.c.

char* LZ4_slideInputBufferHC ( void LZ4HC_Data)

Definition at line 782 of file lz4hc.c.

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

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 
)
static

Definition at line 309 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  limit,
BYTE oend 
)

Definition at line 249 of file lz4hc.c.

static int LZ4HC_getSearchNum ( int  compressionLevel)
static

Definition at line 528 of file lz4hc.c.

static U32 LZ4HC_hashPtr ( const void ptr)
static

Definition at line 76 of file lz4hc.c.

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

Definition at line 83 of file lz4hc.c.

FORCE_INLINE void LZ4HC_Insert ( LZ4HC_CCtx_internal hc4,
const BYTE ip 
)

Definition at line 97 of file lz4hc.c.

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

Definition at line 118 of file lz4hc.c.

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 
)

Definition at line 166 of file lz4hc.c.

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

Definition at line 645 of file lz4hc.c.



librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:27