![]() |
Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
|
#include <stddef.h>#include "zstd_v01.h"#include "../common/compiler.h"#include "../common/error_private.h"#include <stdlib.h>#include <string.h>#include <stdio.h>Data Structures | |
| struct | FSE_CStream_t |
| struct | FSE_CState_t |
| struct | FSE_DStream_t |
| struct | FSE_DState_t |
| struct | FSE_decode_t |
| struct | FSE_symbolCompressionTransform |
| struct | FSE_DTableHeader |
| struct | HUF_CElt_s |
| struct | nodeElt_s |
| struct | HUF_DElt |
| struct | blockProperties_t |
| struct | seqStore_t |
| struct | ZSTD_Cctx_s |
| struct | seq_t |
| struct | seqState_t |
| struct | ZSTDv01_Dctx_s |
Macros | |
| #define | FSE_DTABLE_SIZE_U32(maxTableLog) |
| #define | HUF_DTABLE_SIZE_U16(maxTableLog) |
| #define | HUF_CREATE_STATIC_DTABLE(DTable, maxTableLog) |
| #define | FSE_LIST_ERRORS(ITEM) |
| #define | FSE_GENERATE_ENUM(ENUM) |
| #define | FSE_MAX_MEMORY_USAGE 14 |
| #define | FSE_DEFAULT_MEMORY_USAGE 13 |
| #define | FSE_MAX_SYMBOL_VALUE 255 |
| #define | FSE_FUNCTION_TYPE BYTE |
| #define | FSE_FUNCTION_EXTENSION |
| #define | GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) |
| #define | FORCE_INLINE static |
| #define | MEM_ACCESS_MODULE |
| #define | FSE_MAX_TABLELOG (FSE_MAX_MEMORY_USAGE-2) |
| #define | FSE_MAX_TABLESIZE (1U<<FSE_MAX_TABLELOG) |
| #define | FSE_MAXTABLESIZE_MASK (FSE_MAX_TABLESIZE-1) |
| #define | FSE_DEFAULT_TABLELOG (FSE_DEFAULT_MEMORY_USAGE-2) |
| #define | FSE_MIN_TABLELOG 5 |
| #define | FSE_TABLELOG_ABSOLUTE_MAX 15 |
| #define | FSE_STATIC_ASSERT(c) |
| #define | FSE_CAT(X, Y) |
| #define | FSE_FUNCTION_NAME(X, Y) |
| #define | FSE_TYPE_NAME(X, Y) |
| #define | FSE_DECODE_TYPE FSE_decode_t |
| #define | FSE_GETSYMBOL(statePtr) |
| #define | HUF_MAX_SYMBOL_VALUE 255 |
| #define | HUF_DEFAULT_TABLELOG 12 /* used by default, when not specified */ |
| #define | HUF_MAX_TABLELOG 12 /* max possible tableLog; for allocation purpose; can be modified */ |
| #define | HUF_ABSOLUTEMAX_TABLELOG 16 /* absolute limit of HUF_MAX_TABLELOG. Beyond that value, code does not work */ |
| #define | HUF_DECODE_SYMBOL_0(n, Dstream) |
| #define | HUF_DECODE_SYMBOL_1(n, Dstream) |
| #define | HUF_DECODE_SYMBOL_2(n, Dstream) |
| #define | ZSTD_MEMORY_USAGE 17 |
| #define | ZSTD_UNALIGNED_ACCESS 0 |
| #define | HASH_LOG (ZSTD_MEMORY_USAGE - 2) |
| #define | HASH_TABLESIZE (1 << HASH_LOG) |
| #define | HASH_MASK (HASH_TABLESIZE - 1) |
| #define | KNUTH 2654435761 |
| #define | BIT7 128 |
| #define | BIT6 64 |
| #define | BIT5 32 |
| #define | BIT4 16 |
| #define | KB *(1 <<10) |
| #define | MB *(1 <<20) |
| #define | GB *(1U<<30) |
| #define | BLOCKSIZE (128 KB) /* define, for static allocation */ |
| #define | WORKPLACESIZE (BLOCKSIZE*3) |
| #define | MINMATCH 4 |
| #define | MLbits 7 |
| #define | LLbits 6 |
| #define | Offbits 5 |
| #define | MaxML ((1<<MLbits )-1) |
| #define | MaxLL ((1<<LLbits )-1) |
| #define | MaxOff ((1<<Offbits)-1) |
| #define | LitFSELog 11 |
| #define | MLFSELog 10 |
| #define | LLFSELog 10 |
| #define | OffFSELog 9 |
| #define | MAX(a, b) |
| #define | MaxSeq MAX(MaxLL, MaxML) |
| #define | LITERAL_NOENTROPY 63 |
| #define | COMMAND_NOENTROPY 7 /* to remove */ |
| #define | ZSTD_CONTENTSIZE_ERROR (0ULL - 2) |
| #define | COPY8(d, s) |
| #define | ZSTD_VERSION_MAJOR 0 /* for breaking interface changes */ |
| #define | ZSTD_VERSION_MINOR 1 /* for new (non-breaking) interface capabilities */ |
| #define | ZSTD_VERSION_RELEASE 3 /* for tweaks, bug-fixes, or development */ |
| #define | ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE) |
Typedefs | |
| typedef struct HUF_CElt_s | HUF_CElt |
| typedef struct nodeElt_s | nodeElt |
| typedef struct ZSTD_Cctx_s | cctxi_t |
| typedef struct ZSTDv01_Dctx_s | dctx_t |
Enumerations | |
| enum | FSE_errorCodes { FSE_LIST_ERRORS =(FSE_GENERATE_ENUM) } |
| enum | FSE_DStream_status { FSE_DStream_unfinished = 0 , FSE_DStream_endOfBuffer = 1 , FSE_DStream_completed = 2 , FSE_DStream_tooFar = 3 } |
| enum | blockType_t { bt_compressed , bt_raw , bt_rle , bt_end } |
Functions | |
| FORCE_INLINE unsigned | FSE_highbit32 (U32 val) |
| FORCE_INLINE size_t | FSE_decompress_usingDTable_generic (void *dst, size_t maxDstSize, const void *cSrc, size_t cSrcSize, const FSE_DTable *dt, const unsigned fast) |
| unsigned | ZSTDv01_isError (size_t code) |
| size_t | ZSTDv01_decompressDCtx (void *ctx, void *dst, size_t maxDstSize, const void *src, size_t srcSize) |
| size_t | ZSTDv01_decompress (void *dst, size_t maxDstSize, const void *src, size_t srcSize) |
| void | ZSTDv01_findFrameSizeInfoLegacy (const void *src, size_t srcSize, size_t *cSize, unsigned long long *dBound) |
| size_t | ZSTDv01_resetDCtx (ZSTDv01_Dctx *dctx) |
| ZSTDv01_Dctx * | ZSTDv01_createDCtx (void) |
| size_t | ZSTDv01_freeDCtx (ZSTDv01_Dctx *dctx) |
| size_t | ZSTDv01_nextSrcSizeToDecompress (ZSTDv01_Dctx *dctx) |
| size_t | ZSTDv01_decompressContinue (ZSTDv01_Dctx *dctx, void *dst, size_t maxDstSize, const void *src, size_t srcSize) |
| #define BIT4 16 |
| #define BIT5 32 |
| #define BIT6 64 |
| #define BIT7 128 |
| #define COMMAND_NOENTROPY 7 /* to remove */ |
| #define FORCE_INLINE static |
| #define FSE_DECODE_TYPE FSE_decode_t |
| #define FSE_DEFAULT_MEMORY_USAGE 13 |
| #define FSE_DEFAULT_TABLELOG (FSE_DEFAULT_MEMORY_USAGE-2) |
| #define FSE_DTABLE_SIZE_U32 | ( | maxTableLog | ) |
| #define FSE_FUNCTION_EXTENSION |
| #define FSE_FUNCTION_NAME | ( | X, | |
| Y ) |
| #define FSE_FUNCTION_TYPE BYTE |
| #define FSE_GENERATE_ENUM | ( | ENUM | ) |
| #define FSE_GETSYMBOL | ( | statePtr | ) |
| #define FSE_LIST_ERRORS | ( | ITEM | ) |
| #define FSE_MAX_MEMORY_USAGE 14 |
| #define FSE_MAX_SYMBOL_VALUE 255 |
| #define FSE_MAX_TABLELOG (FSE_MAX_MEMORY_USAGE-2) |
| #define FSE_MAX_TABLESIZE (1U<<FSE_MAX_TABLELOG) |
| #define FSE_MAXTABLESIZE_MASK (FSE_MAX_TABLESIZE-1) |
| #define FSE_MIN_TABLELOG 5 |
| #define FSE_STATIC_ASSERT | ( | c | ) |
| #define FSE_TABLELOG_ABSOLUTE_MAX 15 |
| #define GB *(1U<<30) |
| #define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) |
| #define HASH_LOG (ZSTD_MEMORY_USAGE - 2) |
| #define HASH_MASK (HASH_TABLESIZE - 1) |
| #define HASH_TABLESIZE (1 << HASH_LOG) |
| #define HUF_ABSOLUTEMAX_TABLELOG 16 /* absolute limit of HUF_MAX_TABLELOG. Beyond that value, code does not work */ |
| #define HUF_CREATE_STATIC_DTABLE | ( | DTable, | |
| maxTableLog ) |
| #define HUF_DECODE_SYMBOL_0 | ( | n, | |
| Dstream ) |
| #define HUF_DECODE_SYMBOL_1 | ( | n, | |
| Dstream ) |
| #define HUF_DECODE_SYMBOL_2 | ( | n, | |
| Dstream ) |
| #define HUF_DEFAULT_TABLELOG 12 /* used by default, when not specified */ |
| #define HUF_DTABLE_SIZE_U16 | ( | maxTableLog | ) |
| #define HUF_MAX_SYMBOL_VALUE 255 |
| #define HUF_MAX_TABLELOG 12 /* max possible tableLog; for allocation purpose; can be modified */ |
| #define KB *(1 <<10) |
| #define KNUTH 2654435761 |
| #define LITERAL_NOENTROPY 63 |
| #define LitFSELog 11 |
| #define LLbits 6 |
| #define LLFSELog 10 |
| #define MaxLL ((1<<LLbits )-1) |
| #define MaxML ((1<<MLbits )-1) |
| #define MaxOff ((1<<Offbits)-1) |
| #define MB *(1 <<20) |
| #define MEM_ACCESS_MODULE |
| #define MINMATCH 4 |
| #define MLbits 7 |
| #define MLFSELog 10 |
| #define Offbits 5 |
| #define OffFSELog 9 |
| #define WORKPLACESIZE (BLOCKSIZE*3) |
| #define ZSTD_CONTENTSIZE_ERROR (0ULL - 2) |
| #define ZSTD_MEMORY_USAGE 17 |
| #define ZSTD_UNALIGNED_ACCESS 0 |
| #define ZSTD_VERSION_MAJOR 0 /* for breaking interface changes */ |
| #define ZSTD_VERSION_MINOR 1 /* for new (non-breaking) interface capabilities */ |
| #define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE) |
| #define ZSTD_VERSION_RELEASE 3 /* for tweaks, bug-fixes, or development */ |
| typedef struct ZSTD_Cctx_s cctxi_t |
| typedef struct ZSTDv01_Dctx_s dctx_t |
| typedef struct HUF_CElt_s HUF_CElt |
| enum blockType_t |
| enum FSE_DStream_status |
| enum FSE_errorCodes |
| FORCE_INLINE size_t FSE_decompress_usingDTable_generic | ( | void * | dst, |
| size_t | maxDstSize, | ||
| const void * | cSrc, | ||
| size_t | cSrcSize, | ||
| const FSE_DTable * | dt, | ||
| const unsigned | fast ) |
| FORCE_INLINE unsigned FSE_highbit32 | ( | U32 | val | ) |
| ZSTDv01_Dctx * ZSTDv01_createDCtx | ( | void | ) |
| size_t ZSTDv01_decompress | ( | void * | dst, |
| size_t | maxOriginalSize, | ||
| const void * | src, | ||
| size_t | compressedSize ) |
ZSTDv01_decompress() : decompress ZSTD frames compliant with v0.1.x format compressedSize : is the exact source size maxOriginalSize : is the size of the 'dst' buffer, which must be already allocated. It must be equal or larger than originalSize, otherwise decompression will fail. return : the number of bytes decompressed into destination buffer (originalSize) or an errorCode if it fails (which can be tested using ZSTDv01_isError())
| size_t ZSTDv01_decompressContinue | ( | ZSTDv01_Dctx * | dctx, |
| void * | dst, | ||
| size_t | maxDstSize, | ||
| const void * | src, | ||
| size_t | srcSize ) |
| size_t ZSTDv01_decompressDCtx | ( | void * | ctx, |
| void * | dst, | ||
| size_t | maxDstSize, | ||
| const void * | src, | ||
| size_t | srcSize ) |
| void ZSTDv01_findFrameSizeInfoLegacy | ( | const void * | src, |
| size_t | srcSize, | ||
| size_t * | cSize, | ||
| unsigned long long * | dBound ) |
ZSTDv01_findFrameSizeInfoLegacy() : get the source length and decompressed bound of a ZSTD frame compliant with v0.1.x format srcSize : The size of the 'src' buffer, at least as large as the frame pointed to by 'src' cSize (output parameter) : the number of bytes that would be read to decompress this frame or an error code if it fails (which can be tested using ZSTDv01_isError()) dBound (output parameter) : an upper-bound for the decompressed size of the data in the frame or ZSTD_CONTENTSIZE_ERROR if an error occurs
note : assumes cSize and dBound are not NULL.
| size_t ZSTDv01_freeDCtx | ( | ZSTDv01_Dctx * | dctx | ) |
| unsigned ZSTDv01_isError | ( | size_t | code | ) |
ZSTDv01_isError() : tells if the result of ZSTDv01_decompress() is an error
| size_t ZSTDv01_nextSrcSizeToDecompress | ( | ZSTDv01_Dctx * | dctx | ) |
| size_t ZSTDv01_resetDCtx | ( | ZSTDv01_Dctx * | dctx | ) |