![]() |
Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
|
#include "lz4.h"
Go to the source code of this file.
Data Structures | |
struct | LZ4HC_CCtx_internal |
union | LZ4_streamHC_u |
Macros | |
#define | LZ4HC_CLEVEL_MIN 2 |
#define | LZ4HC_CLEVEL_DEFAULT 9 |
#define | LZ4HC_CLEVEL_OPT_MIN 10 |
#define | LZ4HC_CLEVEL_MAX 12 |
#define | LZ4HC_DICTIONARY_LOGSIZE 16 |
#define | LZ4HC_MAXD (1<<LZ4HC_DICTIONARY_LOGSIZE) |
#define | LZ4HC_MAXD_MASK (LZ4HC_MAXD - 1) |
#define | LZ4HC_HASH_LOG 15 |
#define | LZ4HC_HASHTABLESIZE (1 << LZ4HC_HASH_LOG) |
#define | LZ4HC_HASH_MASK (LZ4HC_HASHTABLESIZE - 1) |
#define | LZ4_STREAMHC_MINSIZE 262200 /* static size, for inter-version compatibility */ |
Variables | |
char * | dest |
char int | inputSize |
char int int | maxOutputSize |
char int int | compressionLevel |
const char * | source |
char * | inputBuffer |
#define LZ4HC_CLEVEL_DEFAULT 9 |
#define LZ4HC_CLEVEL_MAX 12 |
#define LZ4HC_CLEVEL_MIN 2 |
#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) |
LZ4LIB_API void LZ4_attach_HC_dictionary | ( | LZ4_streamHC_t * | working_stream, |
const LZ4_streamHC_t * | dictionary_stream ) |
LZ4_attach_HC_dictionary() : stable since v1.10.0 This API allows for the efficient re-use of a static dictionary many times.
Rather than re-loading the dictionary buffer into a working context before each compression, or copying a pre-loaded dictionary's LZ4_streamHC_t into a working LZ4_streamHC_t, this function introduces a no-copy setup mechanism, in which the working stream references the dictionary stream in-place.
Several assumptions are made about the state of the dictionary stream. Currently, only streams which have been prepared by LZ4_loadDictHC() should be expected to work.
Alternatively, the provided dictionary stream pointer may be NULL, in which case any existing dictionary stream is unset.
A dictionary should only be attached to a stream without any history (i.e., a stream that has just been reset).
The dictionary will remain attached to the working stream only for the current stream session. Calls to LZ4_resetStreamHC(_fast) will remove the dictionary context association from the working stream. The dictionary stream (and source buffer) must remain in-place / accessible / unchanged through the lifetime of the stream session.
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.
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 ) |
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 :
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. 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 :
srcSizePtr
: on success, *srcSizePtr is updated to indicate how much bytes were read from src
LZ4LIB_API int LZ4_compress_HC_extStateHC | ( | void * | stateHC, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | maxDstSize, | ||
int | compressionLevel ) |
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.
LZ4_DEPRECATED | ( | "use LZ4_compress_HC() instead" | ) | const |
LZ4_DEPRECATED | ( | "use LZ4_compress_HC_continue() instead" | ) |
LZ4_DEPRECATED | ( | "use LZ4_compress_HC_extStateHC() instead" | ) |
LZ4_DEPRECATED | ( | "use LZ4_createStreamHC() instead" | ) | const |
LZ4_DEPRECATED | ( | "use LZ4_freeStreamHC() instead" | ) |
LZ4_DEPRECATED | ( | "use LZ4_initStreamHC() instead" | ) |
LZ4_DEPRECATED | ( | "use LZ4_saveDictHC() instead" | ) |
LZ4LIB_API int LZ4_freeStreamHC | ( | LZ4_streamHC_t * | streamHCPtr | ) |
LZ4LIB_API LZ4_streamHC_t * LZ4_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 | ) |
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).
const char char* dest |
char* inputBuffer |
const char* source |