Classes | Macros | Typedefs | Functions | Variables
lz4hc.h File Reference
#include "lz4.h"
Include dependency graph for lz4hc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  LZ4_streamHC_u
 
struct  LZ4HC_CCtx_internal
 

Macros

#define LZ4_STREAMHC_MINSIZE   262200 /* static size, for inter-version compatibility */
 
#define LZ4HC_CLEVEL_DEFAULT   9
 
#define LZ4HC_CLEVEL_MAX   12
 
#define LZ4HC_CLEVEL_MIN   3
 
#define LZ4HC_CLEVEL_OPT_MIN   10
 
#define LZ4HC_DICTIONARY_LOGSIZE   16
 
#define LZ4HC_HASH_LOG   15
 
#define LZ4HC_HASH_MASK   (LZ4HC_HASHTABLESIZE - 1)
 
#define LZ4HC_HASHTABLESIZE   (1 << LZ4HC_HASH_LOG)
 
#define LZ4HC_MAXD   (1<<LZ4HC_DICTIONARY_LOGSIZE)
 
#define LZ4HC_MAXD_MASK   (LZ4HC_MAXD - 1)
 

Typedefs

typedef union LZ4_streamHC_u LZ4_streamHC_t
 
typedef struct LZ4HC_CCtx_internal LZ4HC_CCtx_internal
 

Functions

LZ4LIB_API int LZ4_compress_HC (const char *src, char *dst, int srcSize, int dstCapacity, int compressionLevel)
 
LZ4LIB_API int LZ4_compress_HC_continue (LZ4_streamHC_t *streamHCPtr, const char *src, char *dst, int srcSize, int maxDstSize)
 
LZ4LIB_API int LZ4_compress_HC_continue_destSize (LZ4_streamHC_t *LZ4_streamHCPtr, const char *src, char *dst, int *srcSizePtr, int targetDstSize)
 
LZ4LIB_API int LZ4_compress_HC_destSize (void *stateHC, const char *src, char *dst, int *srcSizePtr, int targetDstSize, int compressionLevel)
 
LZ4LIB_API int LZ4_compress_HC_extStateHC (void *stateHC, const char *src, char *dst, int srcSize, int maxDstSize, int compressionLevel)
 
LZ4LIB_API LZ4_streamHC_tLZ4_createStreamHC (void)
 
 LZ4_DEPRECATED ("use LZ4_compress_HC() instead") LZ4LIB_API int LZ4_compressHC(const char *source
 
 LZ4_DEPRECATED ("use LZ4_compress_HC_continue() instead") LZ4LIB_API int LZ4_compressHC_continue(LZ4_streamHC_t *LZ4_streamHCPtr
 
 LZ4_DEPRECATED ("use LZ4_compress_HC_extStateHC() instead") LZ4LIB_API int LZ4_compressHC_withStateHC(void *state
 
 LZ4_DEPRECATED ("use LZ4_createStreamHC() instead") LZ4LIB_API void *LZ4_createHC(const char *inputBuffer)
 
 LZ4_DEPRECATED ("use LZ4_freeStreamHC() instead") LZ4LIB_API int LZ4_freeHC(void *LZ4HC_Data)
 
 LZ4_DEPRECATED ("use LZ4_initStreamHC() instead") LZ4LIB_API int LZ4_resetStreamStateHC(void *state
 
 LZ4_DEPRECATED ("use LZ4_saveDictHC() instead") LZ4LIB_API char *LZ4_slideInputBufferHC(void *LZ4HC_Data)
 
LZ4LIB_API int LZ4_freeStreamHC (LZ4_streamHC_t *streamHCPtr)
 
LZ4LIB_API LZ4_streamHC_tLZ4_initStreamHC (void *buffer, size_t size)
 
LZ4LIB_API int LZ4_loadDictHC (LZ4_streamHC_t *streamHCPtr, const char *dictionary, int dictSize)
 
LZ4LIB_API void LZ4_resetStreamHC (LZ4_streamHC_t *streamHCPtr, int compressionLevel)
 
LZ4LIB_API void LZ4_resetStreamHC_fast (LZ4_streamHC_t *streamHCPtr, int compressionLevel)
 
LZ4LIB_API int LZ4_saveDictHC (LZ4_streamHC_t *streamHCPtr, char *safeBuffer, int maxDictSize)
 
LZ4LIB_API int LZ4_sizeofStateHC (void)
 

Variables

char int int compressionLevel
 
char * dest
 
char * inputBuffer
 
char int inputSize
 
char int int maxOutputSize
 
const char * source
 

Macro Definition Documentation

◆ LZ4_STREAMHC_MINSIZE

#define LZ4_STREAMHC_MINSIZE   262200 /* static size, for inter-version compatibility */

Definition at line 222 of file lz4hc.h.

◆ LZ4HC_CLEVEL_DEFAULT

#define LZ4HC_CLEVEL_DEFAULT   9

Definition at line 48 of file lz4hc.h.

◆ LZ4HC_CLEVEL_MAX

#define LZ4HC_CLEVEL_MAX   12

Definition at line 50 of file lz4hc.h.

◆ LZ4HC_CLEVEL_MIN

#define LZ4HC_CLEVEL_MIN   3

Definition at line 47 of file lz4hc.h.

◆ LZ4HC_CLEVEL_OPT_MIN

#define LZ4HC_CLEVEL_OPT_MIN   10

Definition at line 49 of file lz4hc.h.

◆ LZ4HC_DICTIONARY_LOGSIZE

#define LZ4HC_DICTIONARY_LOGSIZE   16

Definition at line 192 of file lz4hc.h.

◆ LZ4HC_HASH_LOG

#define LZ4HC_HASH_LOG   15

Definition at line 196 of file lz4hc.h.

◆ LZ4HC_HASH_MASK

#define LZ4HC_HASH_MASK   (LZ4HC_HASHTABLESIZE - 1)

Definition at line 198 of file lz4hc.h.

◆ LZ4HC_HASHTABLESIZE

#define LZ4HC_HASHTABLESIZE   (1 << LZ4HC_HASH_LOG)

Definition at line 197 of file lz4hc.h.

◆ LZ4HC_MAXD

#define LZ4HC_MAXD   (1<<LZ4HC_DICTIONARY_LOGSIZE)

Definition at line 193 of file lz4hc.h.

◆ LZ4HC_MAXD_MASK

#define LZ4HC_MAXD_MASK   (LZ4HC_MAXD - 1)

Definition at line 194 of file lz4hc.h.

Typedef Documentation

◆ LZ4_streamHC_t

Definition at line 101 of file lz4hc.h.

◆ LZ4HC_CCtx_internal

Definition at line 204 of file lz4hc.h.

Function Documentation

◆ LZ4_compress_HC()

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

LZ4LIB_API int LZ4_compress_HC_continue ( LZ4_streamHC_t streamHCPtr,
const char *  src,
char *  dst,
int  srcSize,
int  maxDstSize 
)

Definition at line 1151 of file lz4hc.c.

◆ LZ4_compress_HC_continue_destSize()

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

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

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

Definition at line 951 of file lz4hc.c.

◆ LZ4_createStreamHC()

LZ4LIB_API 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_DEPRECATED() [1/7]

LZ4_DEPRECATED ( "use LZ4_compress_HC() instead"  ) const

◆ LZ4_DEPRECATED() [2/7]

LZ4_DEPRECATED ( "use LZ4_compress_HC_continue() instead"  )

◆ LZ4_DEPRECATED() [3/7]

LZ4_DEPRECATED ( "use LZ4_compress_HC_extStateHC() instead"  )

◆ LZ4_DEPRECATED() [4/7]

LZ4_DEPRECATED ( "use LZ4_createStreamHC() instead"  ) const

◆ LZ4_DEPRECATED() [5/7]

LZ4_DEPRECATED ( "use LZ4_freeStreamHC() instead"  )

◆ LZ4_DEPRECATED() [6/7]

LZ4_DEPRECATED ( "use LZ4_initStreamHC() instead"  )

◆ LZ4_DEPRECATED() [7/7]

LZ4_DEPRECATED ( "use LZ4_saveDictHC() instead"  )

◆ LZ4_freeStreamHC()

LZ4LIB_API int LZ4_freeStreamHC ( LZ4_streamHC_t streamHCPtr)

Definition at line 1001 of file lz4hc.c.

◆ LZ4_initStreamHC()

LZ4LIB_API LZ4_streamHC_t* LZ4_initStreamHC ( void *  buffer,
size_t  size 
)

Definition at line 1011 of file lz4hc.c.

◆ LZ4_loadDictHC()

LZ4LIB_API int LZ4_loadDictHC ( LZ4_streamHC_t streamHCPtr,
const char *  dictionary,
int  dictSize 
)

Definition at line 1066 of file lz4hc.c.

◆ LZ4_resetStreamHC()

LZ4LIB_API void LZ4_resetStreamHC ( LZ4_streamHC_t streamHCPtr,
int  compressionLevel 
)

Definition at line 1027 of file lz4hc.c.

◆ LZ4_resetStreamHC_fast()

LZ4LIB_API void LZ4_resetStreamHC_fast ( LZ4_streamHC_t streamHCPtr,
int  compressionLevel 
)

Definition at line 1033 of file lz4hc.c.

◆ LZ4_saveDictHC()

LZ4LIB_API int LZ4_saveDictHC ( LZ4_streamHC_t streamHCPtr,
char *  safeBuffer,
int  maxDictSize 
)

Definition at line 1171 of file lz4hc.c.

◆ LZ4_sizeofStateHC()

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

Variable Documentation

◆ compressionLevel

const char char int int int compressionLevel

Definition at line 256 of file lz4hc.h.

◆ dest

const char char* dest

Definition at line 254 of file lz4hc.h.

◆ inputBuffer

char* inputBuffer

Definition at line 281 of file lz4hc.h.

◆ inputSize

const char char int inputSize

Definition at line 254 of file lz4hc.h.

◆ maxOutputSize

const char char int int maxOutputSize

Definition at line 255 of file lz4hc.h.

◆ source

const char* source

Definition at line 258 of file lz4hc.h.



plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:49