public class ZstdX
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ZSTD_c_forceAttachDict
Controls whether the contents of a
CDict are used in place, or copied into the working context. |
static int |
ZSTD_c_forceMaxWindow
Force back-reference distances to remain <
windowSize, even when referencing into Dictionary content. |
static int |
ZSTD_c_format
Select a compression format.
|
static int |
ZSTD_c_literalCompressionMode
Controls how the literals are compressed (default is
auto). |
static int |
ZSTD_c_rsyncable
Enables {@code rsyncable mode, which makes compressed files more rsync friendly by adding periodic synchronization points to the compressed data.
|
static int |
ZSTD_c_srcSizeHint
User's best guess of source size.
|
static int |
ZSTD_c_targetCBlockSize
Tries to fit compressed block size to be around
targetCBlockSize. |
static int |
ZSTD_CHAINLOG_MAX |
static int |
ZSTD_CHAINLOG_MAX_32 |
static int |
ZSTD_CHAINLOG_MAX_64 |
static int |
ZSTD_CHAINLOG_MIN |
static int |
ZSTD_d_format |
static int |
ZSTD_dct_auto
ZSTD_dictContentType_e |
static int |
ZSTD_dct_fullDict
ZSTD_dictContentType_e |
static int |
ZSTD_dct_rawContent
ZSTD_dictContentType_e |
static int |
ZSTD_dictDefaultAttach
ZSTD_dictAttachPref_e |
static int |
ZSTD_dictForceAttach
ZSTD_dictAttachPref_e |
static int |
ZSTD_dictForceCopy
ZSTD_dictAttachPref_e |
static int |
ZSTD_dictForceLoad
ZSTD_dictAttachPref_e |
static int |
ZSTD_dlm_byCopy
ZSTD_dictLoadMethod_e |
static int |
ZSTD_dlm_byRef
ZSTD_dictLoadMethod_e |
static int |
ZSTD_f_zstd1
ZSTD_format_e |
static int |
ZSTD_f_zstd1_magicless
ZSTD_format_e |
static int |
ZSTD_frame
ZSTD_frameType_e |
static int |
ZSTD_FRAMEHEADERSIZE_MAX |
static int |
ZSTD_HASHLOG_MAX |
static int |
ZSTD_HASHLOG_MIN |
static int |
ZSTD_HASHLOG3_MAX |
static int |
ZSTD_lcm_auto
ZSTD_literalCompressionMode_e |
static int |
ZSTD_lcm_huffman
ZSTD_literalCompressionMode_e |
static int |
ZSTD_lcm_uncompressed
ZSTD_literalCompressionMode_e |
static int |
ZSTD_LDM_BUCKETSIZELOG_MAX |
static int |
ZSTD_LDM_BUCKETSIZELOG_MIN |
static int |
ZSTD_LDM_HASHLOG_MAX |
static int |
ZSTD_LDM_HASHLOG_MIN |
static int |
ZSTD_LDM_HASHRATELOG_MIN |
static int |
ZSTD_LDM_MINMATCH_MAX |
static int |
ZSTD_LDM_MINMATCH_MIN |
static int |
ZSTD_MINMATCH_MAX |
static int |
ZSTD_MINMATCH_MIN |
static int |
ZSTD_OVERLAPLOG_MAX |
static int |
ZSTD_OVERLAPLOG_MIN |
static int |
ZSTD_SEARCHLOG_MIN |
static int |
ZSTD_skippableFrame
ZSTD_frameType_e |
static int |
ZSTD_SKIPPABLEHEADERSIZE |
static int |
ZSTD_SRCSIZEHINT_MAX |
static int |
ZSTD_SRCSIZEHINT_MIN |
static int |
ZSTD_STRATEGY_MAX |
static int |
ZSTD_STRATEGY_MIN |
static int |
ZSTD_TARGETCBLOCKSIZE_MAX |
static int |
ZSTD_TARGETCBLOCKSIZE_MIN |
static int |
ZSTD_TARGETLENGTH_MAX |
static int |
ZSTD_TARGETLENGTH_MIN |
static int |
ZSTD_WINDOWLOG_LIMIT_DEFAULT |
static int |
ZSTD_WINDOWLOG_MAX |
static int |
ZSTD_WINDOWLOG_MAX_32 |
static int |
ZSTD_WINDOWLOG_MAX_64 |
static int |
ZSTD_WINDOWLOG_MIN |
static int |
ZSTDnit_block
ZSTD_nextInputType_e |
static int |
ZSTDnit_blockHeader
ZSTD_nextInputType_e |
static int |
ZSTDnit_checksum
ZSTD_nextInputType_e |
static int |
ZSTDnit_frameHeader
ZSTD_nextInputType_e |
static int |
ZSTDnit_lastBlock
ZSTD_nextInputType_e |
static int |
ZSTDnit_skippableFrame
ZSTD_nextInputType_e |
| Modifier and Type | Method and Description |
|---|---|
static void |
nZSTD_adjustCParams(long cPar,
long srcSize,
long dictSize,
long __result)
Unsafe version of:
adjustCParams |
static long |
nZSTD_CCtx_getParameter(long cctx,
int param,
long value)
Unsafe version of:
CCtx_getParameter |
static long |
nZSTD_CCtx_loadDictionary_advanced(long cctx,
long dict,
long dictSize,
int dictLoadMethod,
int dictContentType)
Unsafe version of:
CCtx_loadDictionary_advanced |
static long |
nZSTD_CCtx_loadDictionary_byReference(long cctx,
long dict,
long dictSize)
Unsafe version of:
CCtx_loadDictionary_byReference |
static long |
nZSTD_CCtx_refPrefix_advanced(long cctx,
long prefix,
long prefixSize,
int dictContentType)
Unsafe version of:
CCtx_refPrefix_advanced |
static long |
nZSTD_CCtx_setParametersUsingCCtxParams(long cctx,
long params)
Unsafe version of:
CCtx_setParametersUsingCCtxParams |
static long |
nZSTD_CCtxParams_getParameter(long params,
int param,
long value)
Unsafe version of:
CCtxParams_getParameter |
static long |
nZSTD_CCtxParams_init_advanced(long cctxParams,
long params)
Unsafe version of:
CCtxParams_init_advanced |
static long |
nZSTD_CCtxParams_init(long cctxParams,
int compressionLevel)
Unsafe version of:
CCtxParams_init |
static long |
nZSTD_CCtxParams_reset(long params)
Unsafe version of:
CCtxParams_reset |
static long |
nZSTD_CCtxParams_setParameter(long params,
int param,
int value)
Unsafe version of:
CCtxParams_setParameter |
static long |
nZSTD_checkCParams(long params)
Unsafe version of:
checkCParams |
static long |
nZSTD_compressBegin_advanced(long cctx,
long dict,
long dictSize,
long params,
long pledgedSrcSize) |
static long |
nZSTD_compressBegin_usingCDict_advanced(long cctx,
long cdict,
long fParams,
long pledgedSrcSize)
Unsafe version of:
compressBegin_usingCDict_advanced |
static long |
nZSTD_compressBegin_usingCDict(long cctx,
long cdict) |
static long |
nZSTD_compressBegin_usingDict(long cctx,
long dict,
long dictSize,
int compressionLevel) |
static long |
nZSTD_compressBegin(long cctx,
int compressionLevel) |
static long |
nZSTD_compressBlock(long cctx,
long dst,
long dstCapacity,
long src,
long srcSize) |
static long |
nZSTD_compressContinue(long cctx,
long dst,
long dstCapacity,
long src,
long srcSize) |
static long |
nZSTD_compressEnd(long cctx,
long dst,
long dstCapacity,
long src,
long srcSize) |
static long |
nZSTD_compressStream2_simpleArgs(long cctx,
long dst,
long dstCapacity,
long dstPos,
long src,
long srcSize,
long srcPos,
int endOp)
Unsafe version of:
compressStream2_simpleArgs |
static long |
nZSTD_copyCCtx(long cctx,
long preparedCCtx,
long pledgedSrcSize)
Unsafe version of:
copyCCtx |
static void |
nZSTD_copyDCtx(long dctx,
long preparedDCtx) |
static long |
nZSTD_createCCtx_advanced(long customMem) |
static long |
nZSTD_createCDict_advanced(long dict,
long dictSize,
int dictLoadMethod,
int dictContentType,
long cParams,
long customMem)
Unsafe version of:
createCDict_advanced |
static long |
nZSTD_createCDict_byReference(long dictBuffer,
long dictSize,
int compressionLevel)
Unsafe version of:
createCDict_byReference |
static long |
nZSTD_createCStream_advanced(long customMem) |
static long |
nZSTD_createDCtx_advanced(long customMem) |
static long |
nZSTD_createDDict_advanced(long dict,
long dictSize,
int dictLoadMethod,
int dictContentType,
long customMem)
Unsafe version of:
createDDict_advanced |
static long |
nZSTD_createDDict_byReference(long dictBuffer,
long dictSize)
Unsafe version of:
createDDict_byReference |
static long |
nZSTD_createDStream_advanced(long customMem) |
static long |
nZSTD_DCtx_loadDictionary_advanced(long dctx,
long dict,
long dictSize,
int dictLoadMethod,
int dictContentType)
Unsafe version of:
DCtx_loadDictionary_advanced |
static long |
nZSTD_DCtx_loadDictionary_byReference(long dctx,
long dict,
long dictSize)
Unsafe version of:
DCtx_loadDictionary_byReference |
static long |
nZSTD_DCtx_refPrefix_advanced(long dctx,
long prefix,
long prefixSize,
int dictContentType)
Unsafe version of:
DCtx_refPrefix_advanced |
static long |
nZSTD_DCtx_setFormat(long dctx,
int format)
Unsafe version of:
DCtx_setFormat |
static long |
nZSTD_DCtx_setMaxWindowSize(long dctx,
long maxWindowSize)
Unsafe version of:
DCtx_setMaxWindowSize |
static long |
nZSTD_decompressBegin_usingDDict(long dctx,
long ddict) |
static long |
nZSTD_decompressBegin_usingDict(long dctx,
long dict,
long dictSize) |
static long |
nZSTD_decompressBegin(long dctx) |
static long |
nZSTD_decompressBlock(long dctx,
long dst,
long dstCapacity,
long src,
long srcSize) |
static long |
nZSTD_decompressBound(long src,
long srcSize)
Unsafe version of:
decompressBound |
static long |
nZSTD_decompressContinue(long dctx,
long dst,
long dstCapacity,
long src,
long srcSize) |
static long |
nZSTD_decompressStream_simpleArgs(long dctx,
long dst,
long dstCapacity,
long dstPos,
long src,
long srcSize,
long srcPos)
Unsafe version of:
decompressStream_simpleArgs |
static long |
nZSTD_estimateCCtxSize_usingCCtxParams(long params) |
static long |
nZSTD_estimateCCtxSize_usingCParams(long cParams) |
static long |
nZSTD_estimateCDictSize_advanced(long dictSize,
long cParams,
int dictLoadMethod)
Unsafe version of:
estimateCDictSize_advanced |
static long |
nZSTD_estimateCStreamSize_usingCCtxParams(long params) |
static long |
nZSTD_estimateCStreamSize_usingCParams(long cParams) |
static long |
nZSTD_estimateDStreamSize_fromFrame(long src,
long srcSize) |
static long |
nZSTD_findDecompressedSize(long src,
long srcSize)
Unsafe version of:
findDecompressedSize |
static long |
nZSTD_frameHeaderSize(long src,
long srcSize)
Unsafe version of:
frameHeaderSize |
static long |
nZSTD_freeCCtxParams(long params) |
static long |
nZSTD_getBlockSize(long cctx) |
static void |
nZSTD_getCParams(int compressionLevel,
long estimatedSrcSize,
long dictSize,
long __result)
Unsafe version of:
getCParams |
static long |
nZSTD_getFrameHeader_advanced(long zfhPtr,
long src,
long srcSize,
int format)
Unsafe version of:
getFrameHeader_advanced |
static long |
nZSTD_getFrameHeader(long zfhPtr,
long src,
long srcSize)
Unsafe version of:
getFrameHeader |
static void |
nZSTD_getFrameProgression(long cctx,
long __result)
Unsafe version of:
getFrameProgression |
static void |
nZSTD_getParams(int compressionLevel,
long estimatedSrcSize,
long dictSize,
long __result)
Unsafe version of:
getParams |
static long |
nZSTD_getSequences(long zc,
long outSeqs,
long outSeqsSize,
long src,
long srcSize)
Unsafe version of:
getSequences |
static long |
nZSTD_initStaticCCtx(long workspace,
long workspaceSize) |
static long |
nZSTD_initStaticCDict(long workspace,
long workspaceSize,
long dict,
long dictSize,
int dictLoadMethod,
int dictContentType,
long cParams)
Unsafe version of:
initStaticCDict |
static long |
nZSTD_initStaticCStream(long workspace,
long workspaceSize) |
static long |
nZSTD_initStaticDCtx(long workspace,
long workspaceSize) |
static long |
nZSTD_initStaticDDict(long workspace,
long workspaceSize,
long dict,
long dictSize,
int dictLoadMethod,
int dictContentType)
Unsafe version of:
initStaticDDict |
static long |
nZSTD_initStaticDStream(long workspace,
long workspaceSize) |
static long |
nZSTD_insertBlock(long dctx,
long blockStart,
long blockSize)
Unsafe version of:
insertBlock |
static int |
nZSTD_isFrame(long buffer,
long size)
Unsafe version of:
isFrame |
static int |
nZSTD_nextInputType(long dctx) |
static long |
nZSTD_nextSrcSizeToDecompress(long dctx) |
static long |
nZSTD_toFlushNow(long cctx)
Unsafe version of:
toFlushNow |
static ZSTDCompressionParameters |
ZSTD_adjustCParams(ZSTDCompressionParameters cPar,
long srcSize,
long dictSize,
ZSTDCompressionParameters __result)
Optimizes params for a given
srcSize and dictSize. |
static long |
ZSTD_CCtx_getParameter(long cctx,
int param,
java.nio.IntBuffer value)
Gets the requested compression parameter value, selected by
enum ZSTD_cParameter, and stores it into int* value. |
static long |
ZSTD_CCtx_loadDictionary_advanced(long cctx,
java.nio.ByteBuffer dict,
int dictLoadMethod,
int dictContentType)
Same as
CCtx_loadDictionary, but gives finer control over how to load the dictionary (by copy ? by reference ?) and how to interpret it
(automatic ? force raw mode ? full mode only ?). |
static long |
ZSTD_CCtx_loadDictionary_byReference(long cctx,
java.nio.ByteBuffer dict)
Same as
CCtx_loadDictionary, but dictionary content is referenced, instead of being copied into CCtx. |
static long |
ZSTD_CCtx_refPrefix_advanced(long cctx,
java.nio.ByteBuffer prefix,
int dictContentType)
Same as
CCtx_refPrefix, but gives finer control over how to interpret prefix content (automatic ? force raw mode (default) ? full mode only ?). |
static long |
ZSTD_CCtx_setParametersUsingCCtxParams(long cctx,
long params)
Applies a set of
ZSTD_CCtx_params to the compression context. |
static long |
ZSTD_CCtxParams_getParameter(long params,
int param,
java.nio.IntBuffer value)
Similar to
CCtx_getParameter. |
static long |
ZSTD_CCtxParams_init_advanced(long cctxParams,
ZSTDParameters params)
Initializes the compression and frame parameters of
cctxParams according to params. |
static long |
ZSTD_CCtxParams_init(long cctxParams,
int compressionLevel)
Initializes the compression parameters of
cctxParams according to compression level. |
static long |
ZSTD_CCtxParams_reset(long params)
Resets params to default values.
|
static long |
ZSTD_CCtxParams_setParameter(long params,
int param,
int value)
Similar to
CCtx_setParameter. |
static long |
ZSTD_checkCParams(ZSTDCompressionParameters params)
Ensures param values remain within authorized range.
|
static long |
ZSTD_compressBegin_advanced(long cctx,
java.nio.ByteBuffer dict,
ZSTDParameters params,
long pledgedSrcSize) |
static long |
ZSTD_compressBegin_usingCDict_advanced(long cctx,
long cdict,
ZSTDFrameParameters fParams,
long pledgedSrcSize) |
static long |
ZSTD_compressBegin_usingCDict(long cctx,
long cdict) |
static long |
ZSTD_compressBegin_usingDict(long cctx,
java.nio.ByteBuffer dict,
int compressionLevel) |
static long |
ZSTD_compressBegin(long cctx,
int compressionLevel) |
static long |
ZSTD_compressBlock(long cctx,
java.nio.ByteBuffer dst,
java.nio.ByteBuffer src) |
static long |
ZSTD_compressContinue(long cctx,
java.nio.ByteBuffer dst,
java.nio.ByteBuffer src) |
static long |
ZSTD_compressEnd(long cctx,
java.nio.ByteBuffer dst,
java.nio.ByteBuffer src) |
static long |
ZSTD_compressStream2_simpleArgs(long cctx,
java.nio.ByteBuffer dst,
org.lwjgl.PointerBuffer dstPos,
java.nio.ByteBuffer src,
org.lwjgl.PointerBuffer srcPos,
int endOp)
Same as
compressStream2, but using only integral types as arguments. |
static long |
ZSTD_copyCCtx(long cctx,
long preparedCCtx,
long pledgedSrcSize) |
static void |
ZSTD_copyDCtx(long dctx,
long preparedDCtx) |
static long |
ZSTD_createCCtx_advanced(ZSTDCustomMem customMem) |
static long |
ZSTD_createCCtxParams()
Creates a
ZSTD_CCtx_params structure. |
static long |
ZSTD_createCDict_advanced(java.nio.ByteBuffer dict,
int dictLoadMethod,
int dictContentType,
ZSTDCompressionParameters cParams,
ZSTDCustomMem customMem) |
static long |
ZSTD_createCDict_byReference(java.nio.ByteBuffer dictBuffer,
int compressionLevel)
Creates a digested dictionary for compression Dictionary content is just referenced, not duplicated.
|
static long |
ZSTD_createCStream_advanced(ZSTDCustomMem customMem) |
static long |
ZSTD_createDCtx_advanced(ZSTDCustomMem customMem) |
static long |
ZSTD_createDDict_advanced(java.nio.ByteBuffer dict,
int dictLoadMethod,
int dictContentType,
ZSTDCustomMem customMem) |
static long |
ZSTD_createDDict_byReference(java.nio.ByteBuffer dictBuffer)
Creates a digested dictionary, ready to start decompression operation without startup delay.
|
static long |
ZSTD_createDStream_advanced(ZSTDCustomMem customMem) |
static long |
ZSTD_DCtx_loadDictionary_advanced(long dctx,
java.nio.ByteBuffer dict,
int dictLoadMethod,
int dictContentType)
Same as
DCtx_loadDictionary, but gives direct control over how to load the dictionary (by copy ? by reference ?) and how to interpret it
(automatic ? force raw mode ? full mode only ?). |
static long |
ZSTD_DCtx_loadDictionary_byReference(long dctx,
java.nio.ByteBuffer dict)
|
static long |
ZSTD_DCtx_refPrefix_advanced(long dctx,
java.nio.ByteBuffer prefix,
int dictContentType)
Same as
DCtx_refPrefix, but gives finer control over how to interpret prefix content (automatic ? force raw mode (default) ? full mode only ?). |
static long |
ZSTD_DCtx_setFormat(long dctx,
int format)
Instructs the decoder context about what kind of data to decode next.
|
static long |
ZSTD_DCtx_setMaxWindowSize(long dctx,
long maxWindowSize)
Refuses allocating internal buffers for frames requiring a window size larger than provided limit.
|
static long |
ZSTD_decodingBufferSize_min(long windowSize,
long frameContentSize) |
static long |
ZSTD_decompressBegin_usingDDict(long dctx,
long ddict) |
static long |
ZSTD_decompressBegin_usingDict(long dctx,
java.nio.ByteBuffer dict) |
static long |
ZSTD_decompressBegin(long dctx) |
static long |
ZSTD_decompressBlock(long dctx,
java.nio.ByteBuffer dst,
java.nio.ByteBuffer src) |
static long |
ZSTD_decompressBound(java.nio.ByteBuffer src)
Note 1: an error can occur if
src contains an invalid or incorrectly formatted frame. |
static long |
ZSTD_decompressContinue(long dctx,
java.nio.ByteBuffer dst,
java.nio.ByteBuffer src) |
static long |
ZSTD_decompressStream_simpleArgs(long dctx,
java.nio.ByteBuffer dst,
org.lwjgl.PointerBuffer dstPos,
java.nio.ByteBuffer src,
org.lwjgl.PointerBuffer srcPos)
Same as
decompressStream, but using only integral types as arguments. |
static long |
ZSTD_estimateCCtxSize_usingCCtxParams(long params) |
static long |
ZSTD_estimateCCtxSize_usingCParams(ZSTDCompressionParameters cParams) |
static long |
ZSTD_estimateCCtxSize(int compressionLevel)
Estimages memory usage of a future
CCtx, before its creation. |
static long |
ZSTD_estimateCDictSize_advanced(long dictSize,
ZSTDCompressionParameters cParams,
int dictLoadMethod) |
static long |
ZSTD_estimateCDictSize(long dictSize,
int compressionLevel) |
static long |
ZSTD_estimateCStreamSize_usingCCtxParams(long params) |
static long |
ZSTD_estimateCStreamSize_usingCParams(ZSTDCompressionParameters cParams) |
static long |
ZSTD_estimateCStreamSize(int compressionLevel)
Provides a budget large enough for any compression level up to selected one.
|
static long |
ZSTD_estimateDCtxSize() |
static long |
ZSTD_estimateDDictSize(long dictSize,
int dictLoadMethod) |
static long |
ZSTD_estimateDStreamSize_fromFrame(java.nio.ByteBuffer src) |
static long |
ZSTD_estimateDStreamSize(long windowSize) |
static long |
ZSTD_findDecompressedSize(java.nio.ByteBuffer src)
Note 1: decompressed size is an optional field, that may not be present, especially in streaming mode.
|
static int |
ZSTD_FRAMEHEADERSIZE_MIN(int format) |
static int |
ZSTD_FRAMEHEADERSIZE_PREFIX(int format) |
static long |
ZSTD_frameHeaderSize(java.nio.ByteBuffer src) |
static long |
ZSTD_freeCCtxParams(long params) |
static long |
ZSTD_getBlockSize(long cctx) |
static ZSTDCompressionParameters |
ZSTD_getCParams(int compressionLevel,
long estimatedSrcSize,
long dictSize,
ZSTDCompressionParameters __result)
Returns
ZSTD_compressionParameters structure for a selected compression level and estimated srcSize. |
static long |
ZSTD_getFrameHeader_advanced(ZSTDFrameHeader zfhPtr,
java.nio.ByteBuffer src,
int format)
Same as
getFrameHeader, with added capability to select a format (like f_zstd1_magicless). |
static long |
ZSTD_getFrameHeader(ZSTDFrameHeader zfhPtr,
java.nio.ByteBuffer src)
Decode Frame Header, or requires larger
srcSize. |
static ZSTDFrameProgression |
ZSTD_getFrameProgression(long cctx,
ZSTDFrameProgression __result)
Tells how much data has been ingested (read from input) consumed (input actually compressed) and produced (output) for current frame.
|
static ZSTDParameters |
ZSTD_getParams(int compressionLevel,
long estimatedSrcSize,
long dictSize,
ZSTDParameters __result)
Same as getCParams(), but returns a full
ZSTD_parameters object instead of sub-component ZSTD_compressionParameters. |
static long |
ZSTD_getSequences(long zc,
ZSTDSequence.Buffer outSeqs,
java.nio.ByteBuffer src)
Extract sequences from the sequence store
zc can be used to insert custom compression params. |
static long |
ZSTD_initStaticCCtx(java.nio.ByteBuffer workspace) |
static long |
ZSTD_initStaticCDict(java.nio.ByteBuffer workspace,
java.nio.ByteBuffer dict,
int dictLoadMethod,
int dictContentType,
ZSTDCompressionParameters cParams) |
static long |
ZSTD_initStaticCStream(java.nio.ByteBuffer workspace) |
static long |
ZSTD_initStaticDCtx(java.nio.ByteBuffer workspace) |
static long |
ZSTD_initStaticDDict(java.nio.ByteBuffer workspace,
java.nio.ByteBuffer dict,
int dictLoadMethod,
int dictContentType) |
static long |
ZSTD_initStaticDStream(java.nio.ByteBuffer workspace) |
static long |
ZSTD_insertBlock(long dctx,
java.nio.ByteBuffer blockStart)
Insert uncompressed block into
dctx history. |
static boolean |
ZSTD_isFrame(java.nio.ByteBuffer buffer)
Tells if the content of
buffer starts with a valid Frame Identifier. |
static int |
ZSTD_nextInputType(long dctx) |
static long |
ZSTD_nextSrcSizeToDecompress(long dctx) |
static long |
ZSTD_toFlushNow(long cctx)
Tells how many bytes are ready to be flushed immediately.
|
public static final int ZSTD_dct_auto
ZSTD_dictContentType_e
dct_auto - dictionary is "full" when starting with MAGIC_DICTIONARY, otherwise it is "rawContent"dct_rawContent - ensures dictionary is always loaded as rawContent, even if it starts with ZSTD_MAGIC_DICTIONARYdct_fullDict - refuses to load a dictionary if it does not respect Zstandard's specification, starting with ZSTD_MAGIC_DICTIONARYpublic static final int ZSTD_dct_rawContent
ZSTD_dictContentType_e
dct_auto - dictionary is "full" when starting with MAGIC_DICTIONARY, otherwise it is "rawContent"dct_rawContent - ensures dictionary is always loaded as rawContent, even if it starts with ZSTD_MAGIC_DICTIONARYdct_fullDict - refuses to load a dictionary if it does not respect Zstandard's specification, starting with ZSTD_MAGIC_DICTIONARYpublic static final int ZSTD_dct_fullDict
ZSTD_dictContentType_e
dct_auto - dictionary is "full" when starting with MAGIC_DICTIONARY, otherwise it is "rawContent"dct_rawContent - ensures dictionary is always loaded as rawContent, even if it starts with ZSTD_MAGIC_DICTIONARYdct_fullDict - refuses to load a dictionary if it does not respect Zstandard's specification, starting with ZSTD_MAGIC_DICTIONARYpublic static final int ZSTD_dlm_byCopy
ZSTD_dictLoadMethod_e
dlm_byCopy - Copy dictionary content internallydlm_byRef - Reference dictionary content -- the dictionary buffer must outlive its users.public static final int ZSTD_dlm_byRef
ZSTD_dictLoadMethod_e
dlm_byCopy - Copy dictionary content internallydlm_byRef - Reference dictionary content -- the dictionary buffer must outlive its users.public static final int ZSTD_f_zstd1
ZSTD_format_e
f_zstd1 - zstd frame format, specified in zstd_compression_format.md (default)f_zstd1_magicless -
Variant of zstd frame format, without initial 4-bytes magic number. Useful to save 4 bytes per generated frame. Decoder cannot recognise
automatically this format, requiring this instruction.
public static final int ZSTD_f_zstd1_magicless
ZSTD_format_e
f_zstd1 - zstd frame format, specified in zstd_compression_format.md (default)f_zstd1_magicless -
Variant of zstd frame format, without initial 4-bytes magic number. Useful to save 4 bytes per generated frame. Decoder cannot recognise
automatically this format, requiring this instruction.
public static final int ZSTD_dictDefaultAttach
ZSTD_dictAttachPref_e
dictDefaultAttach - Use the default heuristic.dictForceAttach - Never copy the dictionary.dictForceCopy - Always copy the dictionary.dictForceLoad - Always reload the dictionary.public static final int ZSTD_dictForceAttach
ZSTD_dictAttachPref_e
dictDefaultAttach - Use the default heuristic.dictForceAttach - Never copy the dictionary.dictForceCopy - Always copy the dictionary.dictForceLoad - Always reload the dictionary.public static final int ZSTD_dictForceCopy
ZSTD_dictAttachPref_e
dictDefaultAttach - Use the default heuristic.dictForceAttach - Never copy the dictionary.dictForceCopy - Always copy the dictionary.dictForceLoad - Always reload the dictionary.public static final int ZSTD_dictForceLoad
ZSTD_dictAttachPref_e
dictDefaultAttach - Use the default heuristic.dictForceAttach - Never copy the dictionary.dictForceCopy - Always copy the dictionary.dictForceLoad - Always reload the dictionary.public static final int ZSTD_frame
public static final int ZSTD_skippableFrame
public static final int ZSTDnit_frameHeader
ZSTD_nextInputType_e
public static final int ZSTDnit_blockHeader
ZSTD_nextInputType_e
public static final int ZSTDnit_block
ZSTD_nextInputType_e
public static final int ZSTDnit_lastBlock
ZSTD_nextInputType_e
public static final int ZSTDnit_checksum
ZSTD_nextInputType_e
public static final int ZSTDnit_skippableFrame
ZSTD_nextInputType_e
public static final int ZSTD_FRAMEHEADERSIZE_MAX
public static final int ZSTD_SKIPPABLEHEADERSIZE
public static final int ZSTD_WINDOWLOG_MAX_32
public static final int ZSTD_WINDOWLOG_MAX_64
public static final int ZSTD_WINDOWLOG_MAX
public static final int ZSTD_WINDOWLOG_MIN
public static final int ZSTD_HASHLOG_MAX
public static final int ZSTD_HASHLOG_MIN
public static final int ZSTD_CHAINLOG_MAX_32
public static final int ZSTD_CHAINLOG_MAX_64
public static final int ZSTD_CHAINLOG_MAX
public static final int ZSTD_CHAINLOG_MIN
public static final int ZSTD_SEARCHLOG_MIN
public static final int ZSTD_MINMATCH_MAX
public static final int ZSTD_MINMATCH_MIN
public static final int ZSTD_TARGETLENGTH_MAX
public static final int ZSTD_TARGETLENGTH_MIN
public static final int ZSTD_STRATEGY_MIN
public static final int ZSTD_STRATEGY_MAX
public static final int ZSTD_OVERLAPLOG_MIN
public static final int ZSTD_OVERLAPLOG_MAX
public static final int ZSTD_WINDOWLOG_LIMIT_DEFAULT
public static final int ZSTD_LDM_HASHLOG_MIN
public static final int ZSTD_LDM_HASHLOG_MAX
public static final int ZSTD_LDM_MINMATCH_MIN
public static final int ZSTD_LDM_MINMATCH_MAX
public static final int ZSTD_LDM_BUCKETSIZELOG_MIN
public static final int ZSTD_LDM_BUCKETSIZELOG_MAX
public static final int ZSTD_LDM_HASHRATELOG_MIN
public static final int ZSTD_TARGETCBLOCKSIZE_MIN
public static final int ZSTD_TARGETCBLOCKSIZE_MAX
public static final int ZSTD_SRCSIZEHINT_MIN
public static final int ZSTD_SRCSIZEHINT_MAX
public static final int ZSTD_HASHLOG3_MAX
public static final int ZSTD_c_rsyncable
rsyncable mode, which makes compressed files more rsync friendly by adding periodic synchronization points to the compressed data.
The target average block size is c_jobSize / 2. It's possible to modify the job size to increase or decrease the granularity of the synchronization
point. Once the jobSize is smaller than the window size, it will result in compression ratio degradation.
NOTE 1: rsyncable mode only works when multithreading is enabled.
NOTE 2: rsyncable performs poorly in combination with long range mode, since it will decrease the effectiveness of synchronization points,
though mileage may vary.
NOTE 3: Rsyncable mode limits maximum compression speed to ~400 MB/s. If the selected compression level is already running significantly
slower, the overall speed won't be significantly impacted.
public static final int ZSTD_c_format
The value must be of type ZSTD_format_e.
public static final int ZSTD_c_forceMaxWindow
windowSize, even when referencing into Dictionary content. (default:0)public static final int ZSTD_c_forceAttachDict
CDict are used in place, or copied into the working context.
Accepts values from the ZSTD_dictAttachPref_e enum.
public static final int ZSTD_c_literalCompressionMode
auto).
The value must be of type ZSTD_literalCompressionMode_e.
public static final int ZSTD_c_targetCBlockSize
targetCBlockSize.
No target when targetCBlockSize == 0. There is no guarantee on compressed block size. (default:0)
public static final int ZSTD_c_srcSizeHint
Hint is not valid when srcSizeHint == 0. There is no guarantee that hint is close to actual source size, but compression ratio may regress
significantly if guess considerably underestimates.
public static final int ZSTD_d_format
public static final int ZSTD_lcm_auto
ZSTD_literalCompressionMode_e
lcm_auto -
Automatically determine the compression mode based on the compression level.
Negative compression levels will be uncompressed, and positive compression levels will be compressed.
lcm_huffman - Always attempt Huffman compression. Uncompressed literals will still be emitted if Huffman compression is not profitable.lcm_uncompressed - Always emit uncompressed literals.public static final int ZSTD_lcm_huffman
ZSTD_literalCompressionMode_e
lcm_auto -
Automatically determine the compression mode based on the compression level.
Negative compression levels will be uncompressed, and positive compression levels will be compressed.
lcm_huffman - Always attempt Huffman compression. Uncompressed literals will still be emitted if Huffman compression is not profitable.lcm_uncompressed - Always emit uncompressed literals.public static final int ZSTD_lcm_uncompressed
ZSTD_literalCompressionMode_e
lcm_auto -
Automatically determine the compression mode based on the compression level.
Negative compression levels will be uncompressed, and positive compression levels will be compressed.
lcm_huffman - Always attempt Huffman compression. Uncompressed literals will still be emitted if Huffman compression is not profitable.lcm_uncompressed - Always emit uncompressed literals.public static long nZSTD_findDecompressedSize(long src,
long srcSize)
findDecompressedSizesrcSize - must be the exact size of this series (i.e. there should be a frame boundary exactly at srcSize bytes after src + srcSize)public static long ZSTD_findDecompressedSize(java.nio.ByteBuffer src)
return==ZSTD_CONTENTSIZE_UNKNOWN,
data to decompress could be any size. In which case, it's necessary to use streaming mode to decompress data.
Note 2: decompressed size is always present when compression is done with compress.
Note 3: decompressed size can be very large (64-bits value), potentially larger than what local system can handle as a single memory segment. In which case, it's necessary to use streaming mode to decompress data.
Note 4: If source is untrusted, decompressed size could be wrong or intentionally modified. Always ensure result fits within application's authorized limits. Each application can set its own limits.
Note 5: ZSTD_findDecompressedSize handles multiple frames, and so it must traverse the input to read each contained frame header. This is fast
as most of the data is skipped, however it does mean that all frame data must be present and valid.
src - should point to the start of a series of ZSTD encoded and/or skippable framesCONTENTSIZE_UNKNOWNCONTENTSIZE_ERRORpublic static long nZSTD_decompressBound(long src,
long srcSize)
decompressBoundsrcSize - must be the exact size of this series (i.e. there should be a frame boundary at src + srcSize)public static long ZSTD_decompressBound(java.nio.ByteBuffer src)
src contains an invalid or incorrectly formatted frame.
Note 2: the upper-bound is exact when the decompressed size field is available in every ZSTD encoded frame of src. In this case,
findDecompressedSize and ZSTD_decompressBound return the same value.
Note 3: when the decompressed size field isn't available, the upper-bound for that frame is calculated by:
upper-bound = # blocks * min(128 KB, Window_Size)
src - should point to the start of a series of ZSTD encoded and/or skippable framesCONTENTSIZE_ERROR if an error occuredpublic static long nZSTD_frameHeaderSize(long src,
long srcSize)
frameHeaderSizesrcSize - must be ≥ ZSTD_FRAMEHEADERSIZE_PREFIX(int)public static long ZSTD_frameHeaderSize(java.nio.ByteBuffer src)
public static long nZSTD_getSequences(long zc,
long outSeqs,
long outSeqsSize,
long src,
long srcSize)
getSequencespublic static long ZSTD_getSequences(long zc,
ZSTDSequence.Buffer outSeqs,
java.nio.ByteBuffer src)
zc can be used to insert custom compression params.
This function invokes compress2.
public static long ZSTD_estimateCCtxSize(int compressionLevel)
CCtx, before its creation.
ZSTD_estimateCCtxSize() will provide a budget large enough for any compression level up to selected one. Unlike
ZSTD_estimateCStreamSize*, this estimate does not include space for a window buffer, so this estimate is guaranteed to be enough for
single-shot compressions, but not streaming compressions. It will however assume the input may be arbitrarily large, which is the worst case. If
srcSize is known to always be small, estimateCCtxSize_usingCParams can provide a tighter estimation. estimateCCtxSize_usingCParams can be
used in tandem with getCParams to create cParams from compressionLevel. estimateCCtxSize_usingCCtxParams can be used in tandem with
CCtxParams_setParameter.
Note: only single-threaded compression is supported. This function will return an error code if c_nbWorkers is ≥ 1.
public static long nZSTD_estimateCCtxSize_usingCParams(long cParams)
public static long ZSTD_estimateCCtxSize_usingCParams(ZSTDCompressionParameters cParams)
public static long nZSTD_estimateCCtxSize_usingCCtxParams(long params)
public static long ZSTD_estimateCCtxSize_usingCCtxParams(long params)
public static long ZSTD_estimateDCtxSize()
public static long ZSTD_estimateCStreamSize(int compressionLevel)
It will also consider src size to be arbitrarily "large", which is worst case. If srcSize is known to always be small,
estimateCStreamSize_usingCParams can provide a tighter estimation. ZSTD_estimateCStreamSize_usingCParams() can be used in tandem with
getCParams to create cParams from compressionLevel. estimateCStreamSize_usingCCtxParams can be used in tandem with
CCtxParams_setParameter. Only single-threaded compression is supported.
This function will return an error code if c_nbWorkers is ≥ 1.
Note: CStream size estimation is only correct for single-threaded compression. ZSTD_DStream memory budget depends on window
Size. This information can be passed manually, using estimateDStreamSize, or deducted from a valid frame Header, using
estimateDStreamSize_fromFrame.
Note: if streaming is init with function ZSTD_init?Stream_usingDict(), an internal Dict will be created, which additional size is not estimated
here. In this case, get total size by adding ZSTD_estimate?DictSize.
public static long nZSTD_estimateCStreamSize_usingCParams(long cParams)
public static long ZSTD_estimateCStreamSize_usingCParams(ZSTDCompressionParameters cParams)
public static long nZSTD_estimateCStreamSize_usingCCtxParams(long params)
public static long ZSTD_estimateCStreamSize_usingCCtxParams(long params)
public static long ZSTD_estimateDStreamSize(long windowSize)
public static long nZSTD_estimateDStreamSize_fromFrame(long src,
long srcSize)
public static long ZSTD_estimateDStreamSize_fromFrame(java.nio.ByteBuffer src)
public static long ZSTD_estimateCDictSize(long dictSize,
int compressionLevel)
public static long nZSTD_estimateCDictSize_advanced(long dictSize,
long cParams,
int dictLoadMethod)
estimateCDictSize_advancedpublic static long ZSTD_estimateCDictSize_advanced(long dictSize,
ZSTDCompressionParameters cParams,
int dictLoadMethod)
dictLoadMethod - one of:dlm_byCopy | dlm_byRef |
public static long ZSTD_estimateDDictSize(long dictSize,
int dictLoadMethod)
dictLoadMethod - one of:dlm_byCopy | dlm_byRef |
public static long nZSTD_initStaticCCtx(long workspace,
long workspaceSize)
public static long ZSTD_initStaticCCtx(java.nio.ByteBuffer workspace)
public static long nZSTD_initStaticCStream(long workspace,
long workspaceSize)
public static long ZSTD_initStaticCStream(java.nio.ByteBuffer workspace)
public static long nZSTD_initStaticDCtx(long workspace,
long workspaceSize)
public static long ZSTD_initStaticDCtx(java.nio.ByteBuffer workspace)
public static long nZSTD_initStaticDStream(long workspace,
long workspaceSize)
public static long ZSTD_initStaticDStream(java.nio.ByteBuffer workspace)
public static long nZSTD_initStaticCDict(long workspace,
long workspaceSize,
long dict,
long dictSize,
int dictLoadMethod,
int dictContentType,
long cParams)
initStaticCDictpublic static long ZSTD_initStaticCDict(java.nio.ByteBuffer workspace,
java.nio.ByteBuffer dict,
int dictLoadMethod,
int dictContentType,
ZSTDCompressionParameters cParams)
dictLoadMethod - one of:dlm_byCopy | dlm_byRef |
dictContentType - one of:dct_auto | dct_rawContent | dct_fullDict |
public static long nZSTD_initStaticDDict(long workspace,
long workspaceSize,
long dict,
long dictSize,
int dictLoadMethod,
int dictContentType)
initStaticDDictpublic static long ZSTD_initStaticDDict(java.nio.ByteBuffer workspace,
java.nio.ByteBuffer dict,
int dictLoadMethod,
int dictContentType)
dictLoadMethod - one of:dlm_byCopy | dlm_byRef |
dictContentType - one of:dct_auto | dct_rawContent | dct_fullDict |
public static long nZSTD_createCCtx_advanced(long customMem)
public static long ZSTD_createCCtx_advanced(ZSTDCustomMem customMem)
public static long nZSTD_createCStream_advanced(long customMem)
public static long ZSTD_createCStream_advanced(ZSTDCustomMem customMem)
public static long nZSTD_createDCtx_advanced(long customMem)
public static long ZSTD_createDCtx_advanced(ZSTDCustomMem customMem)
public static long nZSTD_createDStream_advanced(long customMem)
public static long ZSTD_createDStream_advanced(ZSTDCustomMem customMem)
public static long nZSTD_createCDict_advanced(long dict,
long dictSize,
int dictLoadMethod,
int dictContentType,
long cParams,
long customMem)
createCDict_advancedpublic static long ZSTD_createCDict_advanced(java.nio.ByteBuffer dict,
int dictLoadMethod,
int dictContentType,
ZSTDCompressionParameters cParams,
ZSTDCustomMem customMem)
dictLoadMethod - one of:dlm_byCopy | dlm_byRef |
dictContentType - one of:dct_auto | dct_rawContent | dct_fullDict |
public static long nZSTD_createDDict_advanced(long dict,
long dictSize,
int dictLoadMethod,
int dictContentType,
long customMem)
createDDict_advancedpublic static long ZSTD_createDDict_advanced(java.nio.ByteBuffer dict,
int dictLoadMethod,
int dictContentType,
ZSTDCustomMem customMem)
dictLoadMethod - one of:dlm_byCopy | dlm_byRef |
dictContentType - one of:dct_auto | dct_rawContent | dct_fullDict |
public static long nZSTD_createCDict_byReference(long dictBuffer,
long dictSize,
int compressionLevel)
createCDict_byReferencepublic static long ZSTD_createCDict_byReference(java.nio.ByteBuffer dictBuffer,
int compressionLevel)
As a consequence, dictBuffer must outlive CDict, and its content must remain unmodified throughout the lifetime of
CDict.
Note: equivalent to createCDict_advanced, with dictLoadMethod==ZSTD_dlm_byRef.
public static void nZSTD_getCParams(int compressionLevel,
long estimatedSrcSize,
long dictSize,
long __result)
getCParamspublic static ZSTDCompressionParameters ZSTD_getCParams(int compressionLevel, long estimatedSrcSize, long dictSize, ZSTDCompressionParameters __result)
ZSTD_compressionParameters structure for a selected compression level and estimated srcSize.estimatedSrcSize - optional, select 0 if not knownpublic static void nZSTD_getParams(int compressionLevel,
long estimatedSrcSize,
long dictSize,
long __result)
getParamspublic static ZSTDParameters ZSTD_getParams(int compressionLevel, long estimatedSrcSize, long dictSize, ZSTDParameters __result)
ZSTD_parameters object instead of sub-component ZSTD_compressionParameters.
All fields of ZSTD_frameParameters are set to default: contentSize=1, checksum=0, noDictID=0.
estimatedSrcSize - optional, select 0 if not knownpublic static long nZSTD_checkCParams(long params)
checkCParamspublic static long ZSTD_checkCParams(ZSTDCompressionParameters params)
isError)public static void nZSTD_adjustCParams(long cPar,
long srcSize,
long dictSize,
long __result)
adjustCParamspublic static ZSTDCompressionParameters ZSTD_adjustCParams(ZSTDCompressionParameters cPar, long srcSize, long dictSize, ZSTDCompressionParameters __result)
srcSize and dictSize. Both values are optional, select 0 if unknown.public static long nZSTD_CCtx_loadDictionary_byReference(long cctx,
long dict,
long dictSize)
CCtx_loadDictionary_byReferencepublic static long ZSTD_CCtx_loadDictionary_byReference(long cctx,
java.nio.ByteBuffer dict)
CCtx_loadDictionary, but dictionary content is referenced, instead of being copied into CCtx.
It saves some memory, but also requires that dict outlives its usage within cctx.
public static long nZSTD_CCtx_loadDictionary_advanced(long cctx,
long dict,
long dictSize,
int dictLoadMethod,
int dictContentType)
CCtx_loadDictionary_advancedpublic static long ZSTD_CCtx_loadDictionary_advanced(long cctx,
java.nio.ByteBuffer dict,
int dictLoadMethod,
int dictContentType)
CCtx_loadDictionary, but gives finer control over how to load the dictionary (by copy ? by reference ?) and how to interpret it
(automatic ? force raw mode ? full mode only ?).dictLoadMethod - one of:dlm_byCopy | dlm_byRef |
dictContentType - one of:dct_auto | dct_rawContent | dct_fullDict |
public static long nZSTD_CCtx_refPrefix_advanced(long cctx,
long prefix,
long prefixSize,
int dictContentType)
CCtx_refPrefix_advancedpublic static long ZSTD_CCtx_refPrefix_advanced(long cctx,
java.nio.ByteBuffer prefix,
int dictContentType)
CCtx_refPrefix, but gives finer control over how to interpret prefix content (automatic ? force raw mode (default) ? full mode only ?).dictContentType - one of:dct_auto | dct_rawContent | dct_fullDict |
public static long nZSTD_CCtx_getParameter(long cctx,
int param,
long value)
CCtx_getParameterpublic static long ZSTD_CCtx_getParameter(long cctx,
int param,
java.nio.IntBuffer value)
enum ZSTD_cParameter, and stores it into int* value.param - one of:isError)public static long ZSTD_createCCtxParams()
ZSTD_CCtx_params structure.public static long nZSTD_freeCCtxParams(long params)
public static long ZSTD_freeCCtxParams(long params)
public static long nZSTD_CCtxParams_reset(long params)
CCtxParams_resetpublic static long ZSTD_CCtxParams_reset(long params)
public static long nZSTD_CCtxParams_init(long cctxParams,
int compressionLevel)
CCtxParams_initpublic static long ZSTD_CCtxParams_init(long cctxParams,
int compressionLevel)
cctxParams according to compression level. All other parameters are reset to their default values.public static long nZSTD_CCtxParams_init_advanced(long cctxParams,
long params)
CCtxParams_init_advancedpublic static long ZSTD_CCtxParams_init_advanced(long cctxParams,
ZSTDParameters params)
cctxParams according to params. All other parameters are reset to their default values.public static long nZSTD_CCtxParams_setParameter(long params,
int param,
int value)
CCtxParams_setParameterpublic static long ZSTD_CCtxParams_setParameter(long params,
int param,
int value)
CCtx_setParameter. Sets one compression parameter, selected by enum ZSTD_cParameter.
Parameters must be applied to a ZSTD_CCtx using CCtx_setParametersUsingCCtxParams.
param - one of:isError)public static long nZSTD_CCtxParams_getParameter(long params,
int param,
long value)
CCtxParams_getParameterpublic static long ZSTD_CCtxParams_getParameter(long params,
int param,
java.nio.IntBuffer value)
CCtx_getParameter. Gets the requested value of one compression parameter, selected by enum ZSTD_cParameter.param - one of:isError)public static long nZSTD_CCtx_setParametersUsingCCtxParams(long cctx,
long params)
CCtx_setParametersUsingCCtxParamspublic static long ZSTD_CCtx_setParametersUsingCCtxParams(long cctx,
long params)
ZSTD_CCtx_params to the compression context.
This can be done even after compression is started, if nbWorkers==0, this will have no impact until a new compression is started. If
nbWorkers ≥ 1, new parameters will be picked up at next job, with a few restrictions (windowLog, pledgedSrcSize, nbWorkers, jobSize, and
overlapLog are not updated).
public static long nZSTD_compressStream2_simpleArgs(long cctx,
long dst,
long dstCapacity,
long dstPos,
long src,
long srcSize,
long srcPos,
int endOp)
compressStream2_simpleArgspublic static long ZSTD_compressStream2_simpleArgs(long cctx,
java.nio.ByteBuffer dst,
org.lwjgl.PointerBuffer dstPos,
java.nio.ByteBuffer src,
org.lwjgl.PointerBuffer srcPos,
int endOp)
compressStream2, but using only integral types as arguments.
This variant might be helpful for binders from dynamic languages which have troubles handling structures containing memory pointers.
endOp - one of:e_continue | e_flush | e_end |
public static int nZSTD_isFrame(long buffer,
long size)
isFramepublic static boolean ZSTD_isFrame(java.nio.ByteBuffer buffer)
buffer starts with a valid Frame Identifier.
Notes:
size < 4, @return will always be 0.public static long nZSTD_createDDict_byReference(long dictBuffer,
long dictSize)
createDDict_byReferencepublic static long ZSTD_createDDict_byReference(java.nio.ByteBuffer dictBuffer)
Dictionary content is referenced, and therefore stays in dictBuffer. It is important that dictBuffer outlives DDict, it must
remain read accessible throughout the lifetime of DDict.
public static long nZSTD_DCtx_loadDictionary_byReference(long dctx,
long dict,
long dictSize)
DCtx_loadDictionary_byReferencepublic static long ZSTD_DCtx_loadDictionary_byReference(long dctx,
java.nio.ByteBuffer dict)
DCtx_loadDictionary, but references dict content instead of copying it into dctx.
This saves memory if dict remains around. However, it's imperative that dict remains accessible (and unmodified) while being used, so
it must outlive decompression.
public static long nZSTD_DCtx_loadDictionary_advanced(long dctx,
long dict,
long dictSize,
int dictLoadMethod,
int dictContentType)
DCtx_loadDictionary_advancedpublic static long ZSTD_DCtx_loadDictionary_advanced(long dctx,
java.nio.ByteBuffer dict,
int dictLoadMethod,
int dictContentType)
DCtx_loadDictionary, but gives direct control over how to load the dictionary (by copy ? by reference ?) and how to interpret it
(automatic ? force raw mode ? full mode only ?).dictLoadMethod - one of:dlm_byCopy | dlm_byRef |
dictContentType - one of:dct_auto | dct_rawContent | dct_fullDict |
public static long nZSTD_DCtx_refPrefix_advanced(long dctx,
long prefix,
long prefixSize,
int dictContentType)
DCtx_refPrefix_advancedpublic static long ZSTD_DCtx_refPrefix_advanced(long dctx,
java.nio.ByteBuffer prefix,
int dictContentType)
DCtx_refPrefix, but gives finer control over how to interpret prefix content (automatic ? force raw mode (default) ? full mode only ?).dictContentType - one of:dct_auto | dct_rawContent | dct_fullDict |
public static long nZSTD_DCtx_setMaxWindowSize(long dctx,
long maxWindowSize)
DCtx_setMaxWindowSizepublic static long ZSTD_DCtx_setMaxWindowSize(long dctx,
long maxWindowSize)
This protects a decoder context from reserving too much memory for itself (potential attack scenario). This parameter is only useful in streaming mode,
since no internal buffer is allocated in single-pass mode. By default, a decompression context accepts all window sizes ≤ (1 <<
WINDOWLOG_LIMIT_DEFAULT).
isError)public static long nZSTD_DCtx_setFormat(long dctx,
int format)
DCtx_setFormatpublic static long ZSTD_DCtx_setFormat(long dctx,
int format)
This instruction is mandatory to decode data without a fully-formed header, such f_zstd1_magicless for example.
format - one of:f_zstd1 | f_zstd1_magicless |
isError)public static long nZSTD_decompressStream_simpleArgs(long dctx,
long dst,
long dstCapacity,
long dstPos,
long src,
long srcSize,
long srcPos)
decompressStream_simpleArgspublic static long ZSTD_decompressStream_simpleArgs(long dctx,
java.nio.ByteBuffer dst,
org.lwjgl.PointerBuffer dstPos,
java.nio.ByteBuffer src,
org.lwjgl.PointerBuffer srcPos)
decompressStream, but using only integral types as arguments.
This can be helpful for binders from dynamic languages which have troubles handling structures containing memory pointers.
public static void nZSTD_getFrameProgression(long cctx,
long __result)
getFrameProgressionpublic static ZSTDFrameProgression ZSTD_getFrameProgression(long cctx, ZSTDFrameProgression __result)
Note: (ingested - consumed) is amount of input data buffered internally, not yet compressed. Aggregates progression inside active worker
threads.
public static long nZSTD_toFlushNow(long cctx)
toFlushNowpublic static long ZSTD_toFlushNow(long cctx)
Useful for multithreading scenarios (nbWorkers ≥ 1). Probe the oldest active job, defined as oldest job not yet entirely flushed, and check
its output buffer.
== 0, it means either:
getFrameProgression), orpublic static long nZSTD_compressBegin(long cctx,
int compressionLevel)
public static long ZSTD_compressBegin(long cctx,
int compressionLevel)
public static long nZSTD_compressBegin_usingDict(long cctx,
long dict,
long dictSize,
int compressionLevel)
public static long ZSTD_compressBegin_usingDict(long cctx,
java.nio.ByteBuffer dict,
int compressionLevel)
public static long nZSTD_compressBegin_advanced(long cctx,
long dict,
long dictSize,
long params,
long pledgedSrcSize)
public static long ZSTD_compressBegin_advanced(long cctx,
java.nio.ByteBuffer dict,
ZSTDParameters params,
long pledgedSrcSize)
public static long nZSTD_compressBegin_usingCDict(long cctx,
long cdict)
public static long ZSTD_compressBegin_usingCDict(long cctx,
long cdict)
public static long nZSTD_compressBegin_usingCDict_advanced(long cctx,
long cdict,
long fParams,
long pledgedSrcSize)
compressBegin_usingCDict_advancedpublic static long ZSTD_compressBegin_usingCDict_advanced(long cctx,
long cdict,
ZSTDFrameParameters fParams,
long pledgedSrcSize)
pledgedSrcSize - if not known, use CONTENTSIZE_UNKNOWNpublic static long nZSTD_copyCCtx(long cctx,
long preparedCCtx,
long pledgedSrcSize)
copyCCtxpublic static long ZSTD_copyCCtx(long cctx,
long preparedCCtx,
long pledgedSrcSize)
pledgedSrcSize - if not known, use CONTENTSIZE_UNKNOWNpublic static long nZSTD_compressContinue(long cctx,
long dst,
long dstCapacity,
long src,
long srcSize)
public static long ZSTD_compressContinue(long cctx,
java.nio.ByteBuffer dst,
java.nio.ByteBuffer src)
public static long nZSTD_compressEnd(long cctx,
long dst,
long dstCapacity,
long src,
long srcSize)
public static long ZSTD_compressEnd(long cctx,
java.nio.ByteBuffer dst,
java.nio.ByteBuffer src)
public static long nZSTD_getFrameHeader(long zfhPtr,
long src,
long srcSize)
getFrameHeaderpublic static long ZSTD_getFrameHeader(ZSTDFrameHeader zfhPtr, java.nio.ByteBuffer src)
srcSize.zfhPtr is correctly filled, >0, srcSize is too small, value is wanted srcSize amount, or an error code, which can be
tested using isErrorpublic static long nZSTD_getFrameHeader_advanced(long zfhPtr,
long src,
long srcSize,
int format)
getFrameHeader_advancedpublic static long ZSTD_getFrameHeader_advanced(ZSTDFrameHeader zfhPtr, java.nio.ByteBuffer src, int format)
getFrameHeader, with added capability to select a format (like f_zstd1_magicless).format - one of:f_zstd1 | f_zstd1_magicless |
public static long ZSTD_decodingBufferSize_min(long windowSize,
long frameContentSize)
public static long nZSTD_decompressBegin(long dctx)
public static long ZSTD_decompressBegin(long dctx)
public static long nZSTD_decompressBegin_usingDict(long dctx,
long dict,
long dictSize)
public static long ZSTD_decompressBegin_usingDict(long dctx,
java.nio.ByteBuffer dict)
public static long nZSTD_decompressBegin_usingDDict(long dctx,
long ddict)
public static long ZSTD_decompressBegin_usingDDict(long dctx,
long ddict)
public static long nZSTD_nextSrcSizeToDecompress(long dctx)
public static long ZSTD_nextSrcSizeToDecompress(long dctx)
public static long nZSTD_decompressContinue(long dctx,
long dst,
long dstCapacity,
long src,
long srcSize)
public static long ZSTD_decompressContinue(long dctx,
java.nio.ByteBuffer dst,
java.nio.ByteBuffer src)
public static void nZSTD_copyDCtx(long dctx,
long preparedDCtx)
public static void ZSTD_copyDCtx(long dctx,
long preparedDCtx)
public static int nZSTD_nextInputType(long dctx)
public static int ZSTD_nextInputType(long dctx)
public static long nZSTD_getBlockSize(long cctx)
public static long ZSTD_getBlockSize(long cctx)
public static long nZSTD_compressBlock(long cctx,
long dst,
long dstCapacity,
long src,
long srcSize)
public static long ZSTD_compressBlock(long cctx,
java.nio.ByteBuffer dst,
java.nio.ByteBuffer src)
public static long nZSTD_decompressBlock(long dctx,
long dst,
long dstCapacity,
long src,
long srcSize)
public static long ZSTD_decompressBlock(long dctx,
java.nio.ByteBuffer dst,
java.nio.ByteBuffer src)
public static long nZSTD_insertBlock(long dctx,
long blockStart,
long blockSize)
insertBlockpublic static long ZSTD_insertBlock(long dctx,
java.nio.ByteBuffer blockStart)
dctx history. Useful for multi-blocks decompression.public static int ZSTD_FRAMEHEADERSIZE_PREFIX(int format)
public static int ZSTD_FRAMEHEADERSIZE_MIN(int format)
Copyright LWJGL. All Rights Reserved. License terms.