Class ZstdX
- java.lang.Object
-
- org.lwjgl.util.zstd.ZstdX
-
public class ZstdX extends java.lang.ObjectNative bindings to the experimental API of Zstandard (zstd).
-
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidnZSTD_adjustCParams(long cPar, long srcSize, long dictSize, long __result)Unsafe version of:adjustCParamsstatic longnZSTD_CCtx_getParameter(long cctx, int param, long value)Unsafe version of:CCtx_getParameterstatic longnZSTD_CCtx_loadDictionary_advanced(long cctx, long dict, long dictSize, int dictLoadMethod, int dictContentType)Unsafe version of:CCtx_loadDictionary_advancedstatic longnZSTD_CCtx_loadDictionary_byReference(long cctx, long dict, long dictSize)Unsafe version of:CCtx_loadDictionary_byReferencestatic longnZSTD_CCtx_refPrefix_advanced(long cctx, long prefix, long prefixSize, int dictContentType)Unsafe version of:CCtx_refPrefix_advancedstatic longnZSTD_CCtx_refThreadPool(long cctx, long pool)Unsafe version of:CCtx_refThreadPoolstatic longnZSTD_CCtx_setParametersUsingCCtxParams(long cctx, long params)Unsafe version of:CCtx_setParametersUsingCCtxParamsstatic longnZSTD_CCtxParams_getParameter(long params, int param, long value)Unsafe version of:CCtxParams_getParameterstatic longnZSTD_CCtxParams_init(long cctxParams, int compressionLevel)Unsafe version of:CCtxParams_initstatic longnZSTD_CCtxParams_init_advanced(long cctxParams, long params)Unsafe version of:CCtxParams_init_advancedstatic longnZSTD_CCtxParams_reset(long params)Unsafe version of:CCtxParams_resetstatic longnZSTD_CCtxParams_setParameter(long params, int param, int value)Unsafe version of:CCtxParams_setParameterstatic longnZSTD_checkCParams(long params)Unsafe version of:checkCParamsstatic longnZSTD_compressBegin(long cctx, int compressionLevel)static longnZSTD_compressBegin_usingCDict(long cctx, long cdict)static longnZSTD_compressBegin_usingDict(long cctx, long dict, long dictSize, int compressionLevel)static longnZSTD_compressBlock(long cctx, long dst, long dstCapacity, long src, long srcSize)static longnZSTD_compressContinue(long cctx, long dst, long dstCapacity, long src, long srcSize)static longnZSTD_compressEnd(long cctx, long dst, long dstCapacity, long src, long srcSize)static longnZSTD_compressSequences(long cctx, long dst, long dstSize, long inSeqs, long inSeqsSize, long src, long srcSize)Unsafe version of:compressSequencesstatic longnZSTD_compressStream2_simpleArgs(long cctx, long dst, long dstCapacity, long dstPos, long src, long srcSize, long srcPos, int endOp)Unsafe version of:compressStream2_simpleArgsstatic longnZSTD_copyCCtx(long cctx, long preparedCCtx, long pledgedSrcSize)Unsafe version of:copyCCtxstatic voidnZSTD_copyDCtx(long dctx, long preparedDCtx)static longnZSTD_createCCtx_advanced(long customMem)static longnZSTD_createCDict_advanced(long dict, long dictSize, int dictLoadMethod, int dictContentType, long cParams, long customMem)Unsafe version of:createCDict_advancedstatic longnZSTD_createCDict_advanced2(long dict, long dictSize, int dictLoadMethod, int dictContentType, long cctxParams, long customMem)Unsafe version of:createCDict_advanced2static longnZSTD_createCDict_byReference(long dictBuffer, long dictSize, int compressionLevel)Unsafe version of:createCDict_byReferencestatic longnZSTD_createCStream_advanced(long customMem)static longnZSTD_createDCtx_advanced(long customMem)static longnZSTD_createDDict_advanced(long dict, long dictSize, int dictLoadMethod, int dictContentType, long customMem)Unsafe version of:createDDict_advancedstatic longnZSTD_createDDict_byReference(long dictBuffer, long dictSize)Unsafe version of:createDDict_byReferencestatic longnZSTD_createDStream_advanced(long customMem)static longnZSTD_DCtx_getParameter(long dctx, int param, long value)Unsafe version of:DCtx_getParameterstatic longnZSTD_DCtx_loadDictionary_advanced(long dctx, long dict, long dictSize, int dictLoadMethod, int dictContentType)Unsafe version of:DCtx_loadDictionary_advancedstatic longnZSTD_DCtx_loadDictionary_byReference(long dctx, long dict, long dictSize)Unsafe version of:DCtx_loadDictionary_byReferencestatic longnZSTD_DCtx_refPrefix_advanced(long dctx, long prefix, long prefixSize, int dictContentType)Unsafe version of:DCtx_refPrefix_advancedstatic longnZSTD_DCtx_setMaxWindowSize(long dctx, long maxWindowSize)Unsafe version of:DCtx_setMaxWindowSizestatic longnZSTD_decompressBegin(long dctx)static longnZSTD_decompressBegin_usingDDict(long dctx, long ddict)static longnZSTD_decompressBegin_usingDict(long dctx, long dict, long dictSize)static longnZSTD_decompressBlock(long dctx, long dst, long dstCapacity, long src, long srcSize)static longnZSTD_decompressBound(long src, long srcSize)Unsafe version of:decompressBoundstatic longnZSTD_decompressContinue(long dctx, long dst, long dstCapacity, long src, long srcSize)static longnZSTD_decompressStream_simpleArgs(long dctx, long dst, long dstCapacity, long dstPos, long src, long srcSize, long srcPos)Unsafe version of:decompressStream_simpleArgsstatic longnZSTD_estimateCCtxSize_usingCCtxParams(long params)static longnZSTD_estimateCCtxSize_usingCParams(long cParams)static longnZSTD_estimateCDictSize_advanced(long dictSize, long cParams, int dictLoadMethod)Unsafe version of:estimateCDictSize_advancedstatic longnZSTD_estimateCStreamSize_usingCCtxParams(long params)static longnZSTD_estimateCStreamSize_usingCParams(long cParams)static longnZSTD_estimateDStreamSize_fromFrame(long src, long srcSize)static longnZSTD_findDecompressedSize(long src, long srcSize)Unsafe version of:findDecompressedSizestatic longnZSTD_frameHeaderSize(long src, long srcSize)Unsafe version of:frameHeaderSizestatic longnZSTD_generateSequences(long zc, long outSeqs, long outSeqsSize, long src, long srcSize)Unsafe version of:generateSequencesstatic longnZSTD_getBlockSize(long cctx)static voidnZSTD_getCParams(int compressionLevel, long estimatedSrcSize, long dictSize, long __result)Unsafe version of:getCParamsstatic longnZSTD_getFrameHeader(long zfhPtr, long src, long srcSize)Unsafe version of:getFrameHeaderstatic longnZSTD_getFrameHeader_advanced(long zfhPtr, long src, long srcSize, int format)Unsafe version of:getFrameHeader_advancedstatic voidnZSTD_getFrameProgression(long cctx, long __result)Unsafe version of:getFrameProgressionstatic voidnZSTD_getParams(int compressionLevel, long estimatedSrcSize, long dictSize, long __result)Unsafe version of:getParamsstatic longnZSTD_initStaticCCtx(long workspace, long workspaceSize)static longnZSTD_initStaticCDict(long workspace, long workspaceSize, long dict, long dictSize, int dictLoadMethod, int dictContentType, long cParams)Unsafe version of:initStaticCDictstatic longnZSTD_initStaticCStream(long workspace, long workspaceSize)static longnZSTD_initStaticDCtx(long workspace, long workspaceSize)static longnZSTD_initStaticDDict(long workspace, long workspaceSize, long dict, long dictSize, int dictLoadMethod, int dictContentType)Unsafe version of:initStaticDDictstatic longnZSTD_initStaticDStream(long workspace, long workspaceSize)static longnZSTD_insertBlock(long dctx, long blockStart, long blockSize)Unsafe version of:insertBlockstatic intnZSTD_isFrame(long buffer, long size)Unsafe version of:isFramestatic intnZSTD_isSkippableFrame(long buffer, long size)Unsafe version of:isSkippableFramestatic longnZSTD_mergeBlockDelimiters(long sequences, long seqsSize)Unsafe version of:mergeBlockDelimitersstatic intnZSTD_nextInputType(long dctx)static longnZSTD_nextSrcSizeToDecompress(long dctx)static longnZSTD_readSkippableFrame(long dst, long dstCapacity, long magicVariant, long src, long srcSize)Unsafe version of:readSkippableFramestatic longnZSTD_toFlushNow(long cctx)Unsafe version of:toFlushNowstatic longnZSTD_writeSkippableFrame(long dst, long dstCapacity, long src, long srcSize, int magicVariant)Unsafe version of:writeSkippableFramestatic ZSTDCompressionParametersZSTD_adjustCParams(ZSTDCompressionParameters cPar, long srcSize, long dictSize, ZSTDCompressionParameters __result)Optimizes params for a givensrcSizeanddictSize.static longZSTD_CCtx_getParameter(long cctx, int param, java.nio.IntBuffer value)Gets the requested compression parameter value, selected byenum ZSTD_cParameter, and stores it intoint* value.static longZSTD_CCtx_loadDictionary_advanced(long cctx, java.nio.ByteBuffer dict, int dictLoadMethod, int dictContentType)Same asCCtx_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 longZSTD_CCtx_loadDictionary_byReference(long cctx, java.nio.ByteBuffer dict)Same asCCtx_loadDictionary, but dictionary content is referenced, instead of being copied intoCCtx.static longZSTD_CCtx_refPrefix_advanced(long cctx, java.nio.ByteBuffer prefix, int dictContentType)Same asCCtx_refPrefix, but gives finer control over how to interpret prefix content (automatic ? force raw mode (default) ? full mode only ?).static longZSTD_CCtx_refThreadPool(long cctx, long pool)Assigns a thread pool to a context (useNULLargument value to use an internal thread pool).static longZSTD_CCtx_setParametersUsingCCtxParams(long cctx, long params)Applies a set ofZSTD_CCtx_paramsto the compression context.static longZSTD_CCtxParams_getParameter(long params, int param, java.nio.IntBuffer value)Similar toCCtx_getParameter.static longZSTD_CCtxParams_init(long cctxParams, int compressionLevel)Initializes the compression parameters ofcctxParamsaccording to compression level.static longZSTD_CCtxParams_init_advanced(long cctxParams, ZSTDParameters params)Initializes the compression and frame parameters ofcctxParamsaccording to params.static longZSTD_CCtxParams_reset(long params)Resets params to default values.static longZSTD_CCtxParams_setParameter(long params, int param, int value)Similar toCCtx_setParameter.static longZSTD_checkCParams(ZSTDCompressionParameters params)Ensures param values remain within authorized range.static longZSTD_compressBegin(long cctx, int compressionLevel)static longZSTD_compressBegin_usingCDict(long cctx, long cdict)static longZSTD_compressBegin_usingDict(long cctx, java.nio.ByteBuffer dict, int compressionLevel)static longZSTD_compressBlock(long cctx, java.nio.ByteBuffer dst, java.nio.ByteBuffer src)static longZSTD_compressContinue(long cctx, java.nio.ByteBuffer dst, java.nio.ByteBuffer src)static longZSTD_compressEnd(long cctx, java.nio.ByteBuffer dst, java.nio.ByteBuffer src)static longZSTD_compressSequences(long cctx, java.nio.ByteBuffer dst, ZSTDSequence.Buffer inSeqs, java.nio.ByteBuffer src)Compress an array ofZSTD_Sequence, generated from the original source buffer, intodst.static longZSTD_compressStream2_simpleArgs(long cctx, java.nio.ByteBuffer dst, org.lwjgl.PointerBuffer dstPos, java.nio.ByteBuffer src, org.lwjgl.PointerBuffer srcPos, int endOp)Same ascompressStream2, but using only integral types as arguments.static longZSTD_copyCCtx(long cctx, long preparedCCtx, long pledgedSrcSize)static voidZSTD_copyDCtx(long dctx, long preparedDCtx)static longZSTD_createCCtx_advanced(ZSTDCustomMem customMem)static longZSTD_createCCtxParams()Creates aZSTD_CCtx_paramsstructure.static longZSTD_createCDict_advanced(java.nio.ByteBuffer dict, int dictLoadMethod, int dictContentType, ZSTDCompressionParameters cParams, ZSTDCustomMem customMem)static longZSTD_createCDict_advanced2(java.nio.ByteBuffer dict, int dictLoadMethod, int dictContentType, long cctxParams, ZSTDCustomMem customMem)static longZSTD_createCDict_byReference(java.nio.ByteBuffer dictBuffer, int compressionLevel)Creates a digested dictionary for compression Dictionary content is just referenced, not duplicated.static longZSTD_createCStream_advanced(ZSTDCustomMem customMem)static longZSTD_createDCtx_advanced(ZSTDCustomMem customMem)static longZSTD_createDDict_advanced(java.nio.ByteBuffer dict, int dictLoadMethod, int dictContentType, ZSTDCustomMem customMem)static longZSTD_createDDict_byReference(java.nio.ByteBuffer dictBuffer)Creates a digested dictionary, ready to start decompression operation without startup delay.static longZSTD_createDStream_advanced(ZSTDCustomMem customMem)static longZSTD_createThreadPool(long numThreads)Creates a new thread pool with a given number of threads.static longZSTD_DCtx_getParameter(long dctx, int param, java.nio.IntBuffer value)Gets the requested decompression parameter value, selected by enumZSTD_dParameter, and store it intoint*value.static longZSTD_DCtx_loadDictionary_advanced(long dctx, java.nio.ByteBuffer dict, int dictLoadMethod, int dictContentType)Same asDCtx_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 longZSTD_DCtx_loadDictionary_byReference(long dctx, java.nio.ByteBuffer dict)static longZSTD_DCtx_refPrefix_advanced(long dctx, java.nio.ByteBuffer prefix, int dictContentType)Same asDCtx_refPrefix, but gives finer control over how to interpret prefix content (automatic ? force raw mode (default) ? full mode only ?).static longZSTD_DCtx_setMaxWindowSize(long dctx, long maxWindowSize)Refuses allocating internal buffers for frames requiring a window size larger than provided limit.static longZSTD_decodingBufferSize_min(long windowSize, long frameContentSize)static longZSTD_decompressBegin(long dctx)static longZSTD_decompressBegin_usingDDict(long dctx, long ddict)static longZSTD_decompressBegin_usingDict(long dctx, java.nio.ByteBuffer dict)static longZSTD_decompressBlock(long dctx, java.nio.ByteBuffer dst, java.nio.ByteBuffer src)static longZSTD_decompressBound(java.nio.ByteBuffer src)Note 1: an error can occur ifsrccontains an invalid or incorrectly formatted frame.static longZSTD_decompressContinue(long dctx, java.nio.ByteBuffer dst, java.nio.ByteBuffer src)static longZSTD_decompressStream_simpleArgs(long dctx, java.nio.ByteBuffer dst, org.lwjgl.PointerBuffer dstPos, java.nio.ByteBuffer src, org.lwjgl.PointerBuffer srcPos)Same asdecompressStream, but using only integral types as arguments.static longZSTD_estimateCCtxSize(int compressionLevel)Estimages memory usage of a futureCCtx, before its creation.static longZSTD_estimateCCtxSize_usingCCtxParams(long params)static longZSTD_estimateCCtxSize_usingCParams(ZSTDCompressionParameters cParams)static longZSTD_estimateCDictSize(long dictSize, int compressionLevel)static longZSTD_estimateCDictSize_advanced(long dictSize, ZSTDCompressionParameters cParams, int dictLoadMethod)static longZSTD_estimateCStreamSize(int compressionLevel)Provides a budget large enough for any compression level up to selected one.static longZSTD_estimateCStreamSize_usingCCtxParams(long params)static longZSTD_estimateCStreamSize_usingCParams(ZSTDCompressionParameters cParams)static longZSTD_estimateDCtxSize()static longZSTD_estimateDDictSize(long dictSize, int dictLoadMethod)static longZSTD_estimateDStreamSize(long windowSize)static longZSTD_estimateDStreamSize_fromFrame(java.nio.ByteBuffer src)static longZSTD_findDecompressedSize(java.nio.ByteBuffer src)Note 1: decompressed size is an optional field, that may not be present, especially in streaming mode.static longZSTD_frameHeaderSize(java.nio.ByteBuffer src)static intZSTD_FRAMEHEADERSIZE_MIN(int format)static intZSTD_FRAMEHEADERSIZE_PREFIX(int format)static longZSTD_freeCCtxParams(long params)static voidZSTD_freeThreadPool(long pool)Frees a thread pool.static longZSTD_generateSequences(long zc, ZSTDSequence.Buffer outSeqs, java.nio.ByteBuffer src)Generate sequences usingcompress2, given a source buffer.static longZSTD_getBlockSize(long cctx)static ZSTDCompressionParametersZSTD_getCParams(int compressionLevel, long estimatedSrcSize, long dictSize, ZSTDCompressionParameters __result)ReturnsZSTD_compressionParametersstructure for a selected compression level and estimatedsrcSize.static longZSTD_getFrameHeader(ZSTDFrameHeader zfhPtr, java.nio.ByteBuffer src)Decode Frame Header, or requires largersrcSize.static longZSTD_getFrameHeader_advanced(ZSTDFrameHeader zfhPtr, java.nio.ByteBuffer src, int format)Same asgetFrameHeader, with added capability to select a format (likef_zstd1_magicless).static ZSTDFrameProgressionZSTD_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 ZSTDParametersZSTD_getParams(int compressionLevel, long estimatedSrcSize, long dictSize, ZSTDParameters __result)Same as getCParams(), but returns a fullZSTD_parametersobject instead of sub-componentZSTD_compressionParameters.static longZSTD_initStaticCCtx(java.nio.ByteBuffer workspace)static longZSTD_initStaticCDict(java.nio.ByteBuffer workspace, java.nio.ByteBuffer dict, int dictLoadMethod, int dictContentType, ZSTDCompressionParameters cParams)static longZSTD_initStaticCStream(java.nio.ByteBuffer workspace)static longZSTD_initStaticDCtx(java.nio.ByteBuffer workspace)static longZSTD_initStaticDDict(java.nio.ByteBuffer workspace, java.nio.ByteBuffer dict, int dictLoadMethod, int dictContentType)static longZSTD_initStaticDStream(java.nio.ByteBuffer workspace)static longZSTD_insertBlock(long dctx, java.nio.ByteBuffer blockStart)Insert uncompressed block intodctxhistory.static booleanZSTD_isFrame(java.nio.ByteBuffer buffer)Tells if the content ofbufferstarts with a valid Frame Identifier.static booleanZSTD_isSkippableFrame(java.nio.ByteBuffer buffer)Tells if the content ofbufferstarts with a valid Frame Identifier for a skippable frame.static longZSTD_mergeBlockDelimiters(ZSTDSequence.Buffer sequences)Given an array ofZSTD_Sequence, remove all sequences that represent block delimiters/last literals by merging them into into the literals of the next sequence.static intZSTD_nextInputType(long dctx)static longZSTD_nextSrcSizeToDecompress(long dctx)static longZSTD_readSkippableFrame(java.nio.ByteBuffer dst, java.nio.IntBuffer magicVariant, java.nio.ByteBuffer src)Retrieves a zstd skippable frame containing data given bysrc, and writes it todstbuffer.static longZSTD_toFlushNow(long cctx)Tells how many bytes are ready to be flushed immediately.static longZSTD_writeSkippableFrame(java.nio.ByteBuffer dst, java.nio.ByteBuffer src, int magicVariant)Generates a zstd skippable frame containing data given bysrc, and writes it todstbuffer.
-
-
-
Field Detail
-
ZSTD_dct_auto, ZSTD_dct_rawContent, ZSTD_dct_fullDict
ZSTD_dictContentType_eEnum values:
dct_auto- dictionary is "full" when starting withMAGIC_DICTIONARY, otherwise it is "rawContent"dct_rawContent- ensures dictionary is always loaded asrawContent, even if it starts withZSTD_MAGIC_DICTIONARYdct_fullDict- refuses to load a dictionary if it does not respect Zstandard's specification, starting withZSTD_MAGIC_DICTIONARY
-
ZSTD_dlm_byCopy, ZSTD_dlm_byRef
ZSTD_dictLoadMethod_eEnum values:
dlm_byCopy- Copy dictionary content internallydlm_byRef- Reference dictionary content -- the dictionary buffer must outlive its users.
-
ZSTD_f_zstd1, ZSTD_f_zstd1_magicless
ZSTD_format_eEnum values:
f_zstd1- zstd frame format, specified inzstd_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.
-
ZSTD_dictDefaultAttach, ZSTD_dictForceAttach, ZSTD_dictForceCopy, ZSTD_dictForceLoad
ZSTD_dictAttachPref_eEnum values:
dictDefaultAttach- Use the default heuristic.dictForceAttach- Never copy the dictionary.dictForceCopy- Always copy the dictionary.dictForceLoad- Always reload the dictionary.
-
ZSTDnit_frameHeader, ZSTDnit_blockHeader, ZSTDnit_block, ZSTDnit_lastBlock, ZSTDnit_checksum, ZSTDnit_skippableFrame
ZSTD_nextInputType_eEnum values:
-
ZSTD_FRAMEHEADERSIZE_MAX
- See Also:
- Constant Field Values
-
ZSTD_SKIPPABLEHEADERSIZE
- See Also:
- Constant Field Values
-
ZSTD_WINDOWLOG_MAX_32
- See Also:
- Constant Field Values
-
ZSTD_WINDOWLOG_MAX_64
- See Also:
- Constant Field Values
-
ZSTD_WINDOWLOG_MIN
public static final int ZSTD_WINDOWLOG_MIN
-
ZSTD_HASHLOG_MIN
public static final int ZSTD_HASHLOG_MIN
-
ZSTD_CHAINLOG_MAX_32
- See Also:
- Constant Field Values
-
ZSTD_CHAINLOG_MAX_64
- See Also:
- Constant Field Values
-
ZSTD_CHAINLOG_MIN
public static final int ZSTD_CHAINLOG_MIN
-
ZSTD_SEARCHLOG_MIN
- See Also:
- Constant Field Values
-
ZSTD_MINMATCH_MAX
- See Also:
- Constant Field Values
-
ZSTD_MINMATCH_MIN
- See Also:
- Constant Field Values
-
ZSTD_TARGETLENGTH_MAX
- See Also:
- Constant Field Values
-
ZSTD_TARGETLENGTH_MIN
- See Also:
- Constant Field Values
-
ZSTD_STRATEGY_MIN
- See Also:
- Constant Field Values
-
ZSTD_STRATEGY_MAX
- See Also:
- Constant Field Values
-
ZSTD_OVERLAPLOG_MIN
- See Also:
- Constant Field Values
-
ZSTD_OVERLAPLOG_MAX
- See Also:
- Constant Field Values
-
ZSTD_WINDOWLOG_LIMIT_DEFAULT
- See Also:
- Constant Field Values
-
ZSTD_LDM_HASHLOG_MIN
- See Also:
- Constant Field Values
-
ZSTD_LDM_MINMATCH_MIN
public static final int ZSTD_LDM_MINMATCH_MIN
-
ZSTD_LDM_MINMATCH_MAX
- See Also:
- Constant Field Values
-
ZSTD_LDM_BUCKETSIZELOG_MIN
- See Also:
- Constant Field Values
-
ZSTD_LDM_BUCKETSIZELOG_MAX
- See Also:
- Constant Field Values
-
ZSTD_LDM_HASHRATELOG_MIN
- See Also:
- Constant Field Values
-
ZSTD_TARGETCBLOCKSIZE_MIN
- See Also:
- Constant Field Values
-
ZSTD_TARGETCBLOCKSIZE_MAX
- See Also:
- Constant Field Values
-
ZSTD_SRCSIZEHINT_MIN
- See Also:
- Constant Field Values
-
ZSTD_SRCSIZEHINT_MAX
- See Also:
- Constant Field Values
-
ZSTD_c_rsyncable
Enablesrsyncable mode, which makes compressed files more rsync friendly by adding periodic synchronization points to the compressed data.The target average block size isc_jobSize/ 2. It's possible to modify the job size to increase or decrease the granularity of the synchronization point. Once thejobSizeis smaller than the window size, it will result in compression ratio degradation.NOTE 1:
rsyncablemode only works when multithreading is enabled.NOTE 2:
rsyncableperforms poorly in combination with long range mode, since it will decrease the effectiveness of synchronization points, though mileage may vary.NOTE 3:
Rsyncablemode 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.
-
ZSTD_c_format
Select a compression format.The value must be of type
ZSTD_format_e.
-
ZSTD_c_forceMaxWindow
Force back-reference distances to remain <windowSize, even when referencing into Dictionary content. (default:0)
-
ZSTD_c_forceAttachDict
Controls whether the contents of aCDictare used in place, or copied into the working context.Accepts values from the
ZSTD_dictAttachPref_eenum.
-
ZSTD_c_literalCompressionMode
Controlled withZSTD_paramSwitch_eenum.- Default is
ps_auto. - Set to
ps_disableto never compress literals. - Set to
ps_enableto always compress literals. (Note: uncompressed literals may still be emitted if huffman is not beneficial to use.)
By default, in
ZSTD_ps_auto, the library will decide at runtime whether to use literals compression based on the compression parameters - specifically, negative compression levels do not use literal compression. - Default is
-
ZSTD_c_targetCBlockSize
Tries to fit compressed block size to be aroundtargetCBlockSize.No target when
targetCBlockSize == 0. There is no guarantee on compressed block size. (default:0)
-
ZSTD_c_srcSizeHint
User's best guess of source size.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.
-
ZSTD_c_enableDedicatedDictSearch
Controls whether the new and experimental "dedicated dictionary search structure" can be used. This feature is still rough around the edges, be prepared for surprising behavior!How to use it:
When using a
CDict, whether to use this feature or not is controlled atCDictcreation, and it must be set in aCCtxParamsset passed into that construction (viacreateCDict_advanced2). A compression will then use the feature or not based on how theCDictwas constructed; the value of this param, set in theCCtx, will have no effect.However, when a dictionary buffer is passed into a
CCtx, such as viaCCtx_loadDictionary, this param can be set on theCCtxto control whether theCDictthat is created internally can use the feature or not.What it does:
Normally, the internal data structures of the
CDictare analogous to what would be stored in aCCtxafter compressing the contents of a dictionary. To an approximation, a compression using a dictionary can then use those data structures to simply continue what is effectively a streaming compression where the simulated compression of the dictionary left off. Which is to say, the search structures in theCDictare normally the same format as in theCCtx.It is possible to do better, since the
CDictis not like aCCtx: the search structures are written once duringCDictcreation, and then are only read after that, while the search structures in theCCtxare both read and written as the compression goes along. This means we can choose a search structure for the dictionary that is read-optimized.This feature enables the use of that different structure.
Note that some of the members of the
ZSTD_compressionParametersstruct have different semantics and constraints in the dedicated search structure. It is highly recommended that you simply set a compression level in theCCtxParamsyou pass into theCDictcreation call, and avoid messing with thecParamsdirectly.Effects:
This will only have any effect when the selected
ZSTD_strategyimplementation supports this feature. Currently, that's limited togreedy,lazy, andlazy2.Note that this means that the
CDicttables can no longer be copied into theCCtx, so thedictattachment modedictForceCopywill no longer be usable. The dictionary can only be attached or reloaded.In general, you should expect compression to be faster--sometimes very much so--and
CDictcreation to be slightly slower. Eventually, we will probably make this mode the default.
-
ZSTD_c_stableInBuffer
Experimental parameter. Default is0 == disabled. Set to 1 to enable.Tells the compressor that the
ZSTD_inBufferwill ALWAYS be the same between calls, except for the modifications that zstd makes to pos (the caller must not modify pos). This is checked by the compressor, and compression will fail if it ever changes. This means the only flush mode that makes sense ise_end, so zstd will error ifZSTD_e_endis not used. The data in theZSTD_inBufferin the range[src, src + pos)MUST not be modified during compression or you will get data corruption.When this flag is enabled zstd won't allocate an input window buffer, because the user guarantees it can reference the
ZSTD_inBufferuntil the frame is complete. But, it will still allocate an output buffer large enough to fit a block (seec_stableOutBuffer). This will also avoid thememcpy()from the input buffer to the input window buffer.NOTE:
compressStream2will error ifZSTD_e_endis not used. That means this flag cannot be used withZSTD_compressStream*().NOTE: So long as the
ZSTD_inBufferalways points to valid memory, using this flag is ALWAYS memory safe, and will never access out-of-bounds memory. However, compression WILL fail if you violate the preconditions.WARNING: The data in the
ZSTD_inBufferin the range[dst, dst + pos)MUST not be modified during compression or you will get data corruption. This is because zstd needs to reference data in theZSTD_inBufferto find matches. Normally zstd maintains its own window buffer for this purpose, but passing this flag tells zstd to use the user provided buffer.
-
ZSTD_c_stableOutBuffer
Experimental parameter. Default is0 == disabled. Set to 1 to enable.Tells he compressor that the
ZSTD_outBufferwill not be resized between calls. Specifically:(out.size - out.pos)will never grow. This gives the compressor the freedom to say: If the compressed data doesn't fit in the output buffer then returnerror_dstSize_tooSmall. This allows us to always decompress directly into the output buffer, instead of decompressing into an internal buffer and copying to the output buffer.When this flag is enabled zstd won't allocate an output buffer, because it can write directly to the
ZSTD_outBuffer. It will still allocate the input window buffer (seec_stableInBuffer).Zstd will check that
(out.size - out.pos)never grows and return an error if it does. While not strictly necessary, this should prevent surprises.
-
ZSTD_c_blockDelimiters
Default is0 == ZSTD_sf_noBlockDelimiters.For use with sequence compression API:
compressSequences.Designates whether or not the given array of
ZSTD_Sequencecontains block delimiters and last literals, which are defined as sequences withoffset == 0andmatchLength == 0. See the definition ofZSTD_Sequencefor more specifics.
-
ZSTD_c_validateSequences
Default is0 == disabled. Set to 1 to enable sequence validation.For use with sequence compression API:
compressSequences. Designates whether or not we validate sequences provided toZSTD_compressSequences()during function execution.Without validation, providing a sequence that does not conform to the zstd spec will cause undefined behavior, and may produce a corrupted block.
With validation enabled, a if sequence is invalid (see
doc/zstd_compression_format.mdfor specifics regardingoffset/matchlengthrequirements) then the function will bail out and return an error.
-
ZSTD_c_useBlockSplitter
Controlled withZSTD_paramSwitch_eenum.- Default is
ps_auto. - Set to
ps_disableto never use block splitter. - Set to
ps_enableto always use block splitter.
By default, in
ZSTD_ps_auto, the library will decide at runtime whether to use block splitting based on the compression parameters. - Default is
-
ZSTD_c_useRowMatchFinder
Controlled withZSTD_paramSwitch_eenum.- Default is
ps_auto. - Set to
ps_disableto never use row-based matchfinder. - Set to
ps_enableto force usage of row-based matchfinder.
By default, in
ZSTD_ps_auto, the library will decide at runtime whether to use the row-based matchfinder based on support for SIMD instructions and the window log. Note that this only pertains to compression strategies:greedy,lazy, andlazy2. - Default is
-
ZSTD_c_deterministicRefPrefix
Default is0 == disabled. Set to 1 to enable.Zstd produces different results for prefix compression when the prefix is directly adjacent to the data about to be compressed vs. when it isn't. This is because zstd detects that the two buffers are contiguous and it can use a more efficient match finding algorithm. However, this produces different results than when the two buffers are non-contiguous. This flag forces zstd to always load the prefix in non-contiguous mode, even if it happens to be adjacent to the data, to guarantee determinism.
If you really care about determinism when using a dictionary or prefix, like when doing delta compression, you should select this option. It comes at a speed penalty of about ~2.5% if the dictionary and data happened to be contiguous, and is free if they weren't contiguous. We don't expect that intentionally making the dictionary and data contiguous will be worth the cost to
memcpy()the data.
-
ZSTD_d_format
Experimental parameter.Allows selection between
ZSTD_format_einput compression formats.
-
ZSTD_d_stableOutBuffer
Experimental parameter. Default is 0 == disabled. Set to 1 to enable.Tells the decompressor that the
ZSTD_outBufferwill ALWAYS be the same between calls, except for the modifications that zstd makes topos(the caller must not modifypos). This is checked by the decompressor, and decompression will fail if it ever changes. Therefore theZSTD_outBufferMUST be large enough to fit the entire decompressed frame. This will be checked when the frame content size is known. The data in theZSTD_outBufferin the range[dst, dst + pos)MUST not be modified during decompression or you will get data corruption.When this flags is enabled zstd won't allocate an output buffer, because it can write directly to the
ZSTD_outBuffer, but it will still allocate an input buffer large enough to fit any compressed block. This will also avoid thememcpy()from the internal output buffer to theZSTD_outBuffer. If you need to avoid the input buffer allocation use the buffer-less streaming API.NOTE: So long as the
ZSTD_outBufferalways points to valid memory, using this flag is ALWAYS memory safe, and will never access out-of-bounds memory. However, decompression WILL fail if you violate the preconditions.WARNING: The data in the
ZSTD_outBufferin the range[dst, dst + pos)MUST not be modified during decompression or you will get data corruption. This is because zstd needs to reference data in theZSTD_outBufferto regenerate matches. Normally zstd maintains its own buffer for this purpose, but passing this flag tells zstd to use the user provided buffer.
-
ZSTD_d_forceIgnoreChecksum
Experimental parameter. Default is0 == disabled. Set to 1 to enableTells the decompressor to skip checksum validation during decompression, regardless of whether checksumming was specified during compression. This offers some slight performance benefits, and may be useful for debugging. Param has values of type
ZSTD_forceIgnoreChecksum_e.
-
ZSTD_d_refMultipleDDicts
Experimental parameter. Default is0 == disabled. Set to 1 to enableIf enabled and
dctxis allocated on the heap, then additional memory will be allocated to store references to multipleZSTD_DDict. That is, multiple calls ofDCtx_refDDictusing a givenZSTD_DCtx, rather than overwriting the previousDDictreference, will instead store all references. At decompression time, the appropriatedictIDis selected from the set ofDDictsbased on thedictIDin the frame.Usage is simply calling
ZSTD_DCtx_refDDict()on multiple dict buffers.Param has values of byte
ZSTD_refMultipleDDicts_e.WARNING: Enabling this parameter and calling
ZSTD_DCtx_refDDict(), will trigger memory allocation for the hash table.freeDCtxalso frees this memory. Memory is allocated as perZSTD_DCtx::customMem.Although this function allocates memory for the table, the user is still responsible for memory management of the underlying
ZSTD_DDictthemselves.
-
ZSTD_lcm_auto, ZSTD_lcm_huffman, ZSTD_lcm_uncompressed
ZSTD_literalCompressionMode_eEnum values:
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.
-
ZSTD_ps_auto, ZSTD_ps_enable, ZSTD_ps_disable
ZSTD_paramSwitch_eThis enum controls features which are conditionally beneficial. Zstd typically will make a final decision on whether or not to enable the feature (
ZSTD_ps_auto), but setting the switch toZSTD_ps_enableorZSTD_ps_disableallow for a force enable/disable the feature.Enum values:
ps_auto- Let the library automatically determine whether the feature shall be enabled.ps_enable- Force-enable the feature.ps_disable- Do not use the feature.
-
ZSTD_sf_noBlockDelimiters, ZSTD_sf_explicitBlockDelimiters
ZSTD_sequenceFormat_eEnum values:
sf_noBlockDelimiters- Representation ofZSTD_Sequencehas no block delimiters, sequences only.sf_explicitBlockDelimiters- Representation ofZSTD_Sequencecontains explicit block delimiters.
-
-
Method Detail
-
nZSTD_findDecompressedSize
public static long nZSTD_findDecompressedSize(long src, long srcSize)Unsafe version of:findDecompressedSize- Parameters:
srcSize- must be the exact size of this series (i.e. there should be a frame boundary exactly atsrcSizebytes aftersrc + srcSize)
-
ZSTD_findDecompressedSize
public 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. Whenreturn==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_findDecompressedSizehandles 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.- Parameters:
src- should point to the start of a series of ZSTD encoded and/or skippable frames- Returns:
- decompressed size of all data in all successive frames
- if the decompressed size cannot be determined:
CONTENTSIZE_UNKNOWN - if an error occurred:
CONTENTSIZE_ERROR
-
nZSTD_decompressBound
public static long nZSTD_decompressBound(long src, long srcSize)Unsafe version of:decompressBound- Parameters:
srcSize- must be the exact size of this series (i.e. there should be a frame boundary atsrc + srcSize)
-
ZSTD_decompressBound
public static long ZSTD_decompressBound(java.nio.ByteBuffer src)
Note 1: an error can occur ifsrccontains 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,findDecompressedSizeandZSTD_decompressBoundreturn 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)- Parameters:
src- should point to the start of a series of ZSTD encoded and/or skippable frames- Returns:
- upper-bound for the decompressed size of all data in all successive frames, or
CONTENTSIZE_ERRORif an error occurred
-
nZSTD_frameHeaderSize
public static long nZSTD_frameHeaderSize(long src, long srcSize)Unsafe version of:frameHeaderSize- Parameters:
srcSize- must be ≥ZSTD_FRAMEHEADERSIZE_PREFIX(int)
-
ZSTD_frameHeaderSize
public static long ZSTD_frameHeaderSize(java.nio.ByteBuffer src)
- Returns:
- : size of the Frame Header, or an error code (if srcSize is too small)
-
nZSTD_generateSequences
public static long nZSTD_generateSequences(long zc, long outSeqs, long outSeqsSize, long src, long srcSize)Unsafe version of:generateSequences
-
ZSTD_generateSequences
public static long ZSTD_generateSequences(long zc, ZSTDSequence.Buffer outSeqs, java.nio.ByteBuffer src)Generate sequences usingcompress2, given a source buffer.Each block will end with a dummy sequence with
offset == 0,matchLength == 0, andlitLength == lengthof last literals.litLengthmay be== 0, and if so, then the sequence of(of: 0 ml: 0 ll: 0)simply acts as a block delimiter.zccan be used to insert custom compression params. This function invokescompress2The output of this function can be fed into
compressSequenceswithCCtxsetting ofc_blockDelimitersassf_explicitBlockDelimiters.- Returns:
- number of sequences generated
-
nZSTD_mergeBlockDelimiters
public static long nZSTD_mergeBlockDelimiters(long sequences, long seqsSize)Unsafe version of:mergeBlockDelimiters
-
ZSTD_mergeBlockDelimiters
public static long ZSTD_mergeBlockDelimiters(ZSTDSequence.Buffer sequences)
Given an array ofZSTD_Sequence, remove all sequences that represent block delimiters/last literals by merging them into into the literals of the next sequence.As such, the final generated result has no explicit representation of block boundaries, and the final last literals segment is not represented in the sequences.
The output of this function can be fed into
compressSequenceswithCCtxsetting ofc_blockDelimitersassf_noBlockDelimiters.- Returns:
- number of sequences left after merging
-
nZSTD_compressSequences
public static long nZSTD_compressSequences(long cctx, long dst, long dstSize, long inSeqs, long inSeqsSize, long src, long srcSize)Unsafe version of:compressSequences
-
ZSTD_compressSequences
public static long ZSTD_compressSequences(long cctx, java.nio.ByteBuffer dst, ZSTDSequence.Buffer inSeqs, java.nio.ByteBuffer src)Compress an array ofZSTD_Sequence, generated from the original source buffer, intodst.If a dictionary is included, then the
cctxshould reference thedict. (see:CCtx_refCDict,CCtx_loadDictionary, etc.) The entire source is compressed into a single frame.The compression behavior changes based on
cctxparams. In particular:- If
ZSTD_c_blockDelimiters == ZSTD_sf_noBlockDelimiters, the array ofZSTD_Sequenceis expected to contain no block delimiters (defined inZSTD_Sequence). Block boundaries are roughly determined based on the block size derived from thecctx, and sequences may be split. This is the default setting. - If
ZSTD_c_blockDelimiters == ZSTD_sf_explicitBlockDelimiters, the array ofZSTD_Sequenceis expected to contain block delimiters (defined inZSTD_Sequence). Behavior is undefined if no block delimiters are provided. - If
ZSTD_c_validateSequences == 0, this function will blindly accept the sequences provided. Invalid sequences cause undefined behavior. IfZSTD_c_validateSequences == 1, then if sequence is invalid (seedoc/zstd_compression_format.mdfor specifics regarding offset/matchlength requirements) then the function will bail out and return an error.
In addition to the two adjustable experimental params, there are other important cctx params.
c_minMatchMUST be set as less than or equal to the smallest match generated by the match finder. It has a minimum value ofMINMATCH_MIN.c_compressionLevelaccordingly adjusts the strength of the entropy coder, as it would in typical compression.c_windowLogaffects offset validation: this function will return an error at higher debug levels if a provided offset is larger than what the spec allows for a given window log and dictionary (if present). See:doc/zstd_compression_format.md
Note: Repcodes are, as of now, always re-calculated within this function, so
ZSTD_Sequence::repis unused.Note 2: Once we integrate ability to ingest repcodes, the explicit block delims mode must respect those repcodes exactly, and cannot emit an RLE block that disagrees with the
repcodehistory.- Returns:
- final compressed size or a ZSTD error.
- If
-
nZSTD_writeSkippableFrame
public static long nZSTD_writeSkippableFrame(long dst, long dstCapacity, long src, long srcSize, int magicVariant)Unsafe version of:writeSkippableFrame
-
ZSTD_writeSkippableFrame
public static long ZSTD_writeSkippableFrame(java.nio.ByteBuffer dst, java.nio.ByteBuffer src, int magicVariant)Generates a zstd skippable frame containing data given bysrc, and writes it todstbuffer.Skippable frames begin with a a 4-byte magic number. There are 16 possible choices of magic number, ranging from
MAGIC_SKIPPABLE_STARTtoZSTD_MAGIC_SKIPPABLE_START+15. As such, the parametermagicVariantcontrols the exact skippable frame magic number variant used, so the magic number used will beZSTD_MAGIC_SKIPPABLE_START + magicVariant.Returns an error if destination buffer is not large enough, if the source size is not representable with a 4-byte unsigned int, or if the parameter
magicVariantis greater than 15 (and therefore invalid).- Returns:
- number of bytes written or a ZSTD error
-
nZSTD_readSkippableFrame
public static long nZSTD_readSkippableFrame(long dst, long dstCapacity, long magicVariant, long src, long srcSize)Unsafe version of:readSkippableFrame
-
ZSTD_readSkippableFrame
public static long ZSTD_readSkippableFrame(java.nio.ByteBuffer dst, @Nullable java.nio.IntBuffer magicVariant, java.nio.ByteBuffer src)Retrieves a zstd skippable frame containing data given bysrc, and writes it todstbuffer.The parameter
magicVariantwill receive themagicVariantthat was supplied when the frame was written, i.e.magicNumber - ZSTD_MAGIC_SKIPPABLE_START. This can beNULLif the caller is not interested in themagicVariant.Returns an error if destination buffer is not large enough, or if the frame is not skippable.
- Returns:
- number of bytes written or a ZSTD error
-
nZSTD_isSkippableFrame
public static int nZSTD_isSkippableFrame(long buffer, long size)Unsafe version of:isSkippableFrame
-
ZSTD_isSkippableFrame
public static boolean ZSTD_isSkippableFrame(java.nio.ByteBuffer buffer)
Tells if the content ofbufferstarts with a valid Frame Identifier for a skippable frame.
-
ZSTD_estimateCCtxSize
public static long ZSTD_estimateCCtxSize(int compressionLevel)
Estimages memory usage of a futureCCtx, before its creation.ZSTD_estimateCCtxSize()will provide a memory budget large enough for any compression level up to selected one.Note: Unlike
ZSTD_estimateCStreamSize*(), this estimate does not include space for a window buffer. Therefore, the estimation is only guaranteed for single-shot compressions, not streaming.The estimate will assume the input may be arbitrarily large, which is the worst case.
When
srcSizecan be bound by a known and rather "small" value, this fact can be used to provide a tighter estimation because the CCtx compression context will need less memory. This tighter estimation can be provided by more advanced functionsestimateCCtxSize_usingCParams, which can be used in tandem withgetCParams, andestimateCCtxSize_usingCCtxParams, which can be used in tandem withCCtxParams_setParameter. Both can be used to estimate memory using custom compression parameters and arbitrarysrcSizelimits.Note 2: only single-threaded compression is supported.
estimateCCtxSize_usingCCtxParamswill return an error code ifc_nbWorkersis ≥ 1.
-
nZSTD_estimateCCtxSize_usingCParams
public static long nZSTD_estimateCCtxSize_usingCParams(long cParams)
-
ZSTD_estimateCCtxSize_usingCParams
public static long ZSTD_estimateCCtxSize_usingCParams(ZSTDCompressionParameters cParams)
-
nZSTD_estimateCCtxSize_usingCCtxParams
public static long nZSTD_estimateCCtxSize_usingCCtxParams(long params)
-
ZSTD_estimateCCtxSize_usingCCtxParams
public static long ZSTD_estimateCCtxSize_usingCCtxParams(long params)
-
ZSTD_estimateDCtxSize
public static long ZSTD_estimateDCtxSize()
-
ZSTD_estimateCStreamSize
public static long ZSTD_estimateCStreamSize(int compressionLevel)
Provides a budget large enough for any compression level up to selected one.It will also consider
srcsize to be arbitrarily "large", which is worst case. IfsrcSizeis known to always be small,estimateCStreamSize_usingCParamscan provide a tighter estimation.ZSTD_estimateCStreamSize_usingCParams()can be used in tandem withgetCParamsto createcParamsfrom compressionLevel.estimateCStreamSize_usingCCtxParamscan be used in tandem withCCtxParams_setParameter. Only single-threaded compression is supported.This function will return an error code if
c_nbWorkersis ≥ 1.Note:
CStreamsize estimation is only correct for single-threaded compression.ZSTD_DStreammemory budget depends on windowSize. This information can be passed manually, usingestimateDStreamSize, or deducted from a valid frameHeader, usingestimateDStreamSize_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 addingZSTD_estimate?DictSize.
-
nZSTD_estimateCStreamSize_usingCParams
public static long nZSTD_estimateCStreamSize_usingCParams(long cParams)
-
ZSTD_estimateCStreamSize_usingCParams
public static long ZSTD_estimateCStreamSize_usingCParams(ZSTDCompressionParameters cParams)
-
nZSTD_estimateCStreamSize_usingCCtxParams
public static long nZSTD_estimateCStreamSize_usingCCtxParams(long params)
-
ZSTD_estimateCStreamSize_usingCCtxParams
public static long ZSTD_estimateCStreamSize_usingCCtxParams(long params)
-
ZSTD_estimateDStreamSize
public static long ZSTD_estimateDStreamSize(long windowSize)
-
nZSTD_estimateDStreamSize_fromFrame
public static long nZSTD_estimateDStreamSize_fromFrame(long src, long srcSize)
-
ZSTD_estimateDStreamSize_fromFrame
public static long ZSTD_estimateDStreamSize_fromFrame(java.nio.ByteBuffer src)
-
ZSTD_estimateCDictSize
public static long ZSTD_estimateCDictSize(long dictSize, int compressionLevel)
-
nZSTD_estimateCDictSize_advanced
public static long nZSTD_estimateCDictSize_advanced(long dictSize, long cParams, int dictLoadMethod)Unsafe version of:estimateCDictSize_advanced
-
ZSTD_estimateCDictSize_advanced, ZSTD_estimateDDictSize
public static long ZSTD_estimateCDictSize_advanced(long dictSize, ZSTDCompressionParameters cParams, int dictLoadMethod) public static long ZSTD_estimateDDictSize(long dictSize, int dictLoadMethod)- Parameters:
dictLoadMethod- one of:dlm_byCopydlm_byRef
-
nZSTD_initStaticCCtx
public static long nZSTD_initStaticCCtx(long workspace, long workspaceSize)
-
ZSTD_initStaticCCtx
public static long ZSTD_initStaticCCtx(java.nio.ByteBuffer workspace)
-
nZSTD_initStaticCStream
public static long nZSTD_initStaticCStream(long workspace, long workspaceSize)
-
ZSTD_initStaticCStream
public static long ZSTD_initStaticCStream(java.nio.ByteBuffer workspace)
-
nZSTD_initStaticDCtx
public static long nZSTD_initStaticDCtx(long workspace, long workspaceSize)
-
ZSTD_initStaticDCtx
public static long ZSTD_initStaticDCtx(java.nio.ByteBuffer workspace)
-
nZSTD_initStaticDStream
public static long nZSTD_initStaticDStream(long workspace, long workspaceSize)
-
ZSTD_initStaticDStream
public static long ZSTD_initStaticDStream(java.nio.ByteBuffer workspace)
-
nZSTD_initStaticCDict
public static long nZSTD_initStaticCDict(long workspace, long workspaceSize, long dict, long dictSize, int dictLoadMethod, int dictContentType, long cParams)Unsafe version of:initStaticCDict
-
ZSTD_initStaticCDict
public static long ZSTD_initStaticCDict(java.nio.ByteBuffer workspace, java.nio.ByteBuffer dict, int dictLoadMethod, int dictContentType, ZSTDCompressionParameters cParams)- Parameters:
dictLoadMethod- one of:dlm_byCopydlm_byRefdictContentType- one of:dct_autodct_rawContentdct_fullDict
-
nZSTD_initStaticDDict
public static long nZSTD_initStaticDDict(long workspace, long workspaceSize, long dict, long dictSize, int dictLoadMethod, int dictContentType)Unsafe version of:initStaticDDict
-
ZSTD_initStaticDDict
public static long ZSTD_initStaticDDict(java.nio.ByteBuffer workspace, java.nio.ByteBuffer dict, int dictLoadMethod, int dictContentType)- Parameters:
dictLoadMethod- one of:dlm_byCopydlm_byRefdictContentType- one of:dct_autodct_rawContentdct_fullDict
-
nZSTD_createCCtx_advanced
public static long nZSTD_createCCtx_advanced(long customMem)
-
ZSTD_createCCtx_advanced
public static long ZSTD_createCCtx_advanced(ZSTDCustomMem customMem)
-
nZSTD_createCStream_advanced
public static long nZSTD_createCStream_advanced(long customMem)
-
ZSTD_createCStream_advanced
public static long ZSTD_createCStream_advanced(ZSTDCustomMem customMem)
-
nZSTD_createDCtx_advanced
public static long nZSTD_createDCtx_advanced(long customMem)
-
ZSTD_createDCtx_advanced
public static long ZSTD_createDCtx_advanced(ZSTDCustomMem customMem)
-
nZSTD_createDStream_advanced
public static long nZSTD_createDStream_advanced(long customMem)
-
ZSTD_createDStream_advanced
public static long ZSTD_createDStream_advanced(ZSTDCustomMem customMem)
-
nZSTD_createCDict_advanced
public static long nZSTD_createCDict_advanced(long dict, long dictSize, int dictLoadMethod, int dictContentType, long cParams, long customMem)Unsafe version of:createCDict_advanced
-
ZSTD_createCDict_advanced
public static long ZSTD_createCDict_advanced(java.nio.ByteBuffer dict, int dictLoadMethod, int dictContentType, ZSTDCompressionParameters cParams, ZSTDCustomMem customMem)- Parameters:
dictLoadMethod- one of:dlm_byCopydlm_byRefdictContentType- one of:dct_autodct_rawContentdct_fullDict
-
ZSTD_createThreadPool
public static long ZSTD_createThreadPool(long numThreads)
Creates a new thread pool with a given number of threads.Note that the lifetime of such pool must exist while being used.
-
ZSTD_freeThreadPool
public static void ZSTD_freeThreadPool(long pool)
Frees a thread pool.- Parameters:
pool- acceptsNULLpointer
-
nZSTD_CCtx_refThreadPool
public static long nZSTD_CCtx_refThreadPool(long cctx, long pool)Unsafe version of:CCtx_refThreadPool
-
ZSTD_CCtx_refThreadPool
public static long ZSTD_CCtx_refThreadPool(long cctx, long pool)Assigns a thread pool to a context (useNULLargument value to use an internal thread pool).
-
nZSTD_createCDict_advanced2
public static long nZSTD_createCDict_advanced2(long dict, long dictSize, int dictLoadMethod, int dictContentType, long cctxParams, long customMem)Unsafe version of:createCDict_advanced2
-
ZSTD_createCDict_advanced2
public static long ZSTD_createCDict_advanced2(java.nio.ByteBuffer dict, int dictLoadMethod, int dictContentType, long cctxParams, ZSTDCustomMem customMem)- Parameters:
dictLoadMethod- one of:dlm_byCopydlm_byRefdictContentType- one of:dct_autodct_rawContentdct_fullDict
-
nZSTD_createDDict_advanced
public static long nZSTD_createDDict_advanced(long dict, long dictSize, int dictLoadMethod, int dictContentType, long customMem)Unsafe version of:createDDict_advanced
-
ZSTD_createDDict_advanced
public static long ZSTD_createDDict_advanced(java.nio.ByteBuffer dict, int dictLoadMethod, int dictContentType, ZSTDCustomMem customMem)- Parameters:
dictLoadMethod- one of:dlm_byCopydlm_byRefdictContentType- one of:dct_autodct_rawContentdct_fullDict
-
nZSTD_createCDict_byReference
public static long nZSTD_createCDict_byReference(long dictBuffer, long dictSize, int compressionLevel)Unsafe version of:createCDict_byReference
-
ZSTD_createCDict_byReference
public static long ZSTD_createCDict_byReference(java.nio.ByteBuffer dictBuffer, int compressionLevel)Creates a digested dictionary for compression Dictionary content is just referenced, not duplicated.As a consequence,
dictBuffermust outliveCDict, and its content must remain unmodified throughout the lifetime ofCDict.Note: equivalent to
createCDict_advanced, withdictLoadMethod==ZSTD_dlm_byRef.
-
nZSTD_getCParams
public static void nZSTD_getCParams(int compressionLevel, long estimatedSrcSize, long dictSize, long __result)Unsafe version of:getCParams
-
ZSTD_getCParams
public static ZSTDCompressionParameters ZSTD_getCParams(int compressionLevel, long estimatedSrcSize, long dictSize, ZSTDCompressionParameters __result)
ReturnsZSTD_compressionParametersstructure for a selected compression level and estimatedsrcSize.- Parameters:
estimatedSrcSize- optional, select 0 if not known
-
nZSTD_getParams
public static void nZSTD_getParams(int compressionLevel, long estimatedSrcSize, long dictSize, long __result)Unsafe version of:getParams
-
ZSTD_getParams
public static ZSTDParameters ZSTD_getParams(int compressionLevel, long estimatedSrcSize, long dictSize, ZSTDParameters __result)
Same as getCParams(), but returns a fullZSTD_parametersobject instead of sub-componentZSTD_compressionParameters.All fields of
ZSTD_frameParametersare set to default:contentSize=1, checksum=0, noDictID=0.- Parameters:
estimatedSrcSize- optional, select 0 if not known
-
nZSTD_checkCParams
public static long nZSTD_checkCParams(long params)
Unsafe version of:checkCParams
-
ZSTD_checkCParams
public static long ZSTD_checkCParams(ZSTDCompressionParameters params)
Ensures param values remain within authorized range.- Returns:
- 0 on success, or an error code (can be checked with
isError)
-
nZSTD_adjustCParams
public static void nZSTD_adjustCParams(long cPar, long srcSize, long dictSize, long __result)Unsafe version of:adjustCParams
-
ZSTD_adjustCParams
public static ZSTDCompressionParameters ZSTD_adjustCParams(ZSTDCompressionParameters cPar, long srcSize, long dictSize, ZSTDCompressionParameters __result)
Optimizes params for a givensrcSizeanddictSize. Both values are optional, select 0 if unknown.
-
nZSTD_CCtx_loadDictionary_byReference
public static long nZSTD_CCtx_loadDictionary_byReference(long cctx, long dict, long dictSize)Unsafe version of:CCtx_loadDictionary_byReference
-
ZSTD_CCtx_loadDictionary_byReference
public static long ZSTD_CCtx_loadDictionary_byReference(long cctx, java.nio.ByteBuffer dict)Same asCCtx_loadDictionary, but dictionary content is referenced, instead of being copied intoCCtx.It saves some memory, but also requires that
dictoutlives its usage withincctx.
-
nZSTD_CCtx_loadDictionary_advanced
public static long nZSTD_CCtx_loadDictionary_advanced(long cctx, long dict, long dictSize, int dictLoadMethod, int dictContentType)Unsafe version of:CCtx_loadDictionary_advanced
-
ZSTD_CCtx_loadDictionary_advanced
public static long ZSTD_CCtx_loadDictionary_advanced(long cctx, java.nio.ByteBuffer dict, int dictLoadMethod, int dictContentType)Same asCCtx_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 ?).- Parameters:
dictLoadMethod- one of:dlm_byCopydlm_byRefdictContentType- one of:dct_autodct_rawContentdct_fullDict
-
nZSTD_CCtx_refPrefix_advanced
public static long nZSTD_CCtx_refPrefix_advanced(long cctx, long prefix, long prefixSize, int dictContentType)Unsafe version of:CCtx_refPrefix_advanced
-
ZSTD_CCtx_refPrefix_advanced
public static long ZSTD_CCtx_refPrefix_advanced(long cctx, java.nio.ByteBuffer prefix, int dictContentType)Same asCCtx_refPrefix, but gives finer control over how to interpret prefix content (automatic ? force raw mode (default) ? full mode only ?).- Parameters:
dictContentType- one of:dct_autodct_rawContentdct_fullDict
-
nZSTD_CCtx_getParameter
public static long nZSTD_CCtx_getParameter(long cctx, int param, long value)Unsafe version of:CCtx_getParameter
-
ZSTD_CCtx_getParameter
public static long ZSTD_CCtx_getParameter(long cctx, int param, java.nio.IntBuffer value)Gets the requested compression parameter value, selected byenum ZSTD_cParameter, and stores it intoint* value.- Parameters:
param- one of:- Returns:
- 0, or an error code (which can be tested with
isError)
-
ZSTD_createCCtxParams
public static long ZSTD_createCCtxParams()
Creates aZSTD_CCtx_paramsstructure.
-
ZSTD_freeCCtxParams
public static long ZSTD_freeCCtxParams(long params)
- Parameters:
params- acceptsNULLpointer
-
nZSTD_CCtxParams_reset
public static long nZSTD_CCtxParams_reset(long params)
Unsafe version of:CCtxParams_reset
-
ZSTD_CCtxParams_reset
public static long ZSTD_CCtxParams_reset(long params)
Resets params to default values.
-
nZSTD_CCtxParams_init
public static long nZSTD_CCtxParams_init(long cctxParams, int compressionLevel)Unsafe version of:CCtxParams_init
-
ZSTD_CCtxParams_init
public static long ZSTD_CCtxParams_init(long cctxParams, int compressionLevel)Initializes the compression parameters ofcctxParamsaccording to compression level. All other parameters are reset to their default values.
-
nZSTD_CCtxParams_init_advanced
public static long nZSTD_CCtxParams_init_advanced(long cctxParams, long params)Unsafe version of:CCtxParams_init_advanced
-
ZSTD_CCtxParams_init_advanced
public static long ZSTD_CCtxParams_init_advanced(long cctxParams, ZSTDParameters params)Initializes the compression and frame parameters ofcctxParamsaccording to params. All other parameters are reset to their default values.
-
nZSTD_CCtxParams_setParameter
public static long nZSTD_CCtxParams_setParameter(long params, int param, int value)Unsafe version of:CCtxParams_setParameter
-
ZSTD_CCtxParams_setParameter
public static long ZSTD_CCtxParams_setParameter(long params, int param, int value)Similar toCCtx_setParameter. Sets one compression parameter, selected byenum ZSTD_cParameter.Parameters must be applied to a
ZSTD_CCtxusingCCtx_setParametersUsingCCtxParams.- Parameters:
param- one of:- Returns:
- a code representing success or failure (which can be tested with
isError)
-
nZSTD_CCtxParams_getParameter
public static long nZSTD_CCtxParams_getParameter(long params, int param, long value)Unsafe version of:CCtxParams_getParameter
-
ZSTD_CCtxParams_getParameter
public static long ZSTD_CCtxParams_getParameter(long params, int param, java.nio.IntBuffer value)Similar toCCtx_getParameter. Gets the requested value of one compression parameter, selected byenum ZSTD_cParameter.- Parameters:
param- one of:- Returns:
- 0, or an error code (which can be tested with
isError)
-
nZSTD_CCtx_setParametersUsingCCtxParams
public static long nZSTD_CCtx_setParametersUsingCCtxParams(long cctx, long params)Unsafe version of:CCtx_setParametersUsingCCtxParams
-
ZSTD_CCtx_setParametersUsingCCtxParams
public static long ZSTD_CCtx_setParametersUsingCCtxParams(long cctx, long params)Applies a set ofZSTD_CCtx_paramsto 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. IfnbWorkers≥ 1, new parameters will be picked up at next job, with a few restrictions (windowLog, pledgedSrcSize, nbWorkers, jobSize, and overlapLog are not updated).
-
nZSTD_compressStream2_simpleArgs
public 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
-
ZSTD_compressStream2_simpleArgs
public 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 ascompressStream2, 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.
- Parameters:
endOp- one of:e_continuee_flushe_end
-
nZSTD_isFrame
public static int nZSTD_isFrame(long buffer, long size)Unsafe version of:isFrame
-
ZSTD_isFrame
public static boolean ZSTD_isFrame(java.nio.ByteBuffer buffer)
Tells if the content ofbufferstarts with a valid Frame Identifier.Notes:
- Frame Identifier is 4 bytes. If
size < 4,@returnwill always be 0. - Legacy Frame Identifiers are considered valid only if Legacy Support is enabled.
- Skippable Frame Identifiers are considered valid.
- Frame Identifier is 4 bytes. If
-
nZSTD_createDDict_byReference
public static long nZSTD_createDDict_byReference(long dictBuffer, long dictSize)Unsafe version of:createDDict_byReference
-
ZSTD_createDDict_byReference
public static long ZSTD_createDDict_byReference(java.nio.ByteBuffer dictBuffer)
Creates a digested dictionary, ready to start decompression operation without startup delay.Dictionary content is referenced, and therefore stays in
dictBuffer. It is important thatdictBufferoutlivesDDict, it must remain read accessible throughout the lifetime ofDDict.
-
nZSTD_DCtx_loadDictionary_byReference
public static long nZSTD_DCtx_loadDictionary_byReference(long dctx, long dict, long dictSize)Unsafe version of:DCtx_loadDictionary_byReference
-
ZSTD_DCtx_loadDictionary_byReference
public static long ZSTD_DCtx_loadDictionary_byReference(long dctx, java.nio.ByteBuffer dict)Same asDCtx_loadDictionary, but referencesdictcontent instead of copying it intodctx.This saves memory if
dictremains around. However, it's imperative thatdictremains accessible (and unmodified) while being used, so it must outlive decompression.
-
nZSTD_DCtx_loadDictionary_advanced
public static long nZSTD_DCtx_loadDictionary_advanced(long dctx, long dict, long dictSize, int dictLoadMethod, int dictContentType)Unsafe version of:DCtx_loadDictionary_advanced
-
ZSTD_DCtx_loadDictionary_advanced
public static long ZSTD_DCtx_loadDictionary_advanced(long dctx, java.nio.ByteBuffer dict, int dictLoadMethod, int dictContentType)Same asDCtx_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 ?).- Parameters:
dictLoadMethod- one of:dlm_byCopydlm_byRefdictContentType- one of:dct_autodct_rawContentdct_fullDict
-
nZSTD_DCtx_refPrefix_advanced
public static long nZSTD_DCtx_refPrefix_advanced(long dctx, long prefix, long prefixSize, int dictContentType)Unsafe version of:DCtx_refPrefix_advanced
-
ZSTD_DCtx_refPrefix_advanced
public static long ZSTD_DCtx_refPrefix_advanced(long dctx, java.nio.ByteBuffer prefix, int dictContentType)Same asDCtx_refPrefix, but gives finer control over how to interpret prefix content (automatic ? force raw mode (default) ? full mode only ?).- Parameters:
dictContentType- one of:dct_autodct_rawContentdct_fullDict
-
nZSTD_DCtx_setMaxWindowSize
public static long nZSTD_DCtx_setMaxWindowSize(long dctx, long maxWindowSize)Unsafe version of:DCtx_setMaxWindowSize
-
ZSTD_DCtx_setMaxWindowSize
public static long ZSTD_DCtx_setMaxWindowSize(long dctx, long maxWindowSize)Refuses allocating internal buffers for frames requiring a window size larger than provided limit.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).- Returns:
- 0, or an error code (which can be tested using
isError)
-
nZSTD_DCtx_getParameter
public static long nZSTD_DCtx_getParameter(long dctx, int param, long value)Unsafe version of:DCtx_getParameter
-
ZSTD_DCtx_getParameter
public static long ZSTD_DCtx_getParameter(long dctx, int param, java.nio.IntBuffer value)Gets the requested decompression parameter value, selected by enumZSTD_dParameter, and store it intoint*value.- Returns:
- 0, or an error code (which can be tested with
isError)
-
nZSTD_decompressStream_simpleArgs
public static long nZSTD_decompressStream_simpleArgs(long dctx, long dst, long dstCapacity, long dstPos, long src, long srcSize, long srcPos)Unsafe version of:decompressStream_simpleArgs
-
ZSTD_decompressStream_simpleArgs
public static long ZSTD_decompressStream_simpleArgs(long dctx, java.nio.ByteBuffer dst, org.lwjgl.PointerBuffer dstPos, java.nio.ByteBuffer src, org.lwjgl.PointerBuffer srcPos)Same asdecompressStream, but using only integral types as arguments.This can be helpful for binders from dynamic languages which have troubles handling structures containing memory pointers.
-
nZSTD_getFrameProgression
public static void nZSTD_getFrameProgression(long cctx, long __result)Unsafe version of:getFrameProgression
-
ZSTD_getFrameProgression
public 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.Note:
(ingested - consumed)is amount of input data buffered internally, not yet compressed. Aggregates progression inside active worker threads.
-
nZSTD_toFlushNow
public static long nZSTD_toFlushNow(long cctx)
Unsafe version of:toFlushNow
-
ZSTD_toFlushNow
public static long ZSTD_toFlushNow(long cctx)
Tells how many bytes are ready to be flushed immediately.Useful for multithreading scenarios (
nbWorkers≥ 1). Probe the oldest active job, defined as oldest job not yet entirely flushed, and check its output buffer.- Returns:
- amount of data stored in oldest job and ready to be flushed immediately. If
== 0, it means either:- there is no active job (could be checked with
getFrameProgression), or - oldest job is still actively compressing data, but everything it has produced has also been flushed so far, therefore flush speed is limited by production speed of oldest job irrespective of the speed of concurrent (and newer) jobs.
- there is no active job (could be checked with
-
nZSTD_compressBegin
public static long nZSTD_compressBegin(long cctx, int compressionLevel)
-
ZSTD_compressBegin
public static long ZSTD_compressBegin(long cctx, int compressionLevel)
-
nZSTD_compressBegin_usingDict
public static long nZSTD_compressBegin_usingDict(long cctx, long dict, long dictSize, int compressionLevel)
-
ZSTD_compressBegin_usingDict
public static long ZSTD_compressBegin_usingDict(long cctx, java.nio.ByteBuffer dict, int compressionLevel)
-
nZSTD_compressBegin_usingCDict
public static long nZSTD_compressBegin_usingCDict(long cctx, long cdict)
-
ZSTD_compressBegin_usingCDict
public static long ZSTD_compressBegin_usingCDict(long cctx, long cdict)
-
nZSTD_copyCCtx
public static long nZSTD_copyCCtx(long cctx, long preparedCCtx, long pledgedSrcSize)Unsafe version of:copyCCtx
-
ZSTD_copyCCtx
public static long ZSTD_copyCCtx(long cctx, long preparedCCtx, long pledgedSrcSize)- Parameters:
pledgedSrcSize- if not known, useCONTENTSIZE_UNKNOWN
-
nZSTD_compressContinue
public static long nZSTD_compressContinue(long cctx, long dst, long dstCapacity, long src, long srcSize)
-
ZSTD_compressContinue
public static long ZSTD_compressContinue(long cctx, java.nio.ByteBuffer dst, java.nio.ByteBuffer src)
-
nZSTD_compressEnd
public static long nZSTD_compressEnd(long cctx, long dst, long dstCapacity, long src, long srcSize)
-
ZSTD_compressEnd
public static long ZSTD_compressEnd(long cctx, java.nio.ByteBuffer dst, java.nio.ByteBuffer src)
-
nZSTD_getFrameHeader
public static long nZSTD_getFrameHeader(long zfhPtr, long src, long srcSize)Unsafe version of:getFrameHeader
-
ZSTD_getFrameHeader
public static long ZSTD_getFrameHeader(ZSTDFrameHeader zfhPtr, java.nio.ByteBuffer src)
Decode Frame Header, or requires largersrcSize.- Returns:
- 0,
zfhPtris correctly filled, >0,srcSizeis too small, value is wantedsrcSizeamount, or an error code, which can be tested usingisError
-
nZSTD_getFrameHeader_advanced
public static long nZSTD_getFrameHeader_advanced(long zfhPtr, long src, long srcSize, int format)Unsafe version of:getFrameHeader_advanced
-
ZSTD_getFrameHeader_advanced
public static long ZSTD_getFrameHeader_advanced(ZSTDFrameHeader zfhPtr, java.nio.ByteBuffer src, int format)
Same asgetFrameHeader, with added capability to select a format (likef_zstd1_magicless).- Parameters:
format- one of:f_zstd1f_zstd1_magicless
-
ZSTD_decodingBufferSize_min
public static long ZSTD_decodingBufferSize_min(long windowSize, long frameContentSize)
-
nZSTD_decompressBegin
public static long nZSTD_decompressBegin(long dctx)
-
ZSTD_decompressBegin
public static long ZSTD_decompressBegin(long dctx)
-
nZSTD_decompressBegin_usingDict
public static long nZSTD_decompressBegin_usingDict(long dctx, long dict, long dictSize)
-
ZSTD_decompressBegin_usingDict
public static long ZSTD_decompressBegin_usingDict(long dctx, java.nio.ByteBuffer dict)
-
nZSTD_decompressBegin_usingDDict
public static long nZSTD_decompressBegin_usingDDict(long dctx, long ddict)
-
ZSTD_decompressBegin_usingDDict
public static long ZSTD_decompressBegin_usingDDict(long dctx, long ddict)
-
nZSTD_nextSrcSizeToDecompress
public static long nZSTD_nextSrcSizeToDecompress(long dctx)
-
ZSTD_nextSrcSizeToDecompress
public static long ZSTD_nextSrcSizeToDecompress(long dctx)
-
nZSTD_decompressContinue
public static long nZSTD_decompressContinue(long dctx, long dst, long dstCapacity, long src, long srcSize)
-
ZSTD_decompressContinue
public static long ZSTD_decompressContinue(long dctx, java.nio.ByteBuffer dst, java.nio.ByteBuffer src)
-
nZSTD_copyDCtx
public static void nZSTD_copyDCtx(long dctx, long preparedDCtx)
-
ZSTD_copyDCtx
public static void ZSTD_copyDCtx(long dctx, long preparedDCtx)
-
nZSTD_nextInputType
public static int nZSTD_nextInputType(long dctx)
-
ZSTD_nextInputType
public static int ZSTD_nextInputType(long dctx)
-
nZSTD_getBlockSize
public static long nZSTD_getBlockSize(long cctx)
-
ZSTD_getBlockSize
public static long ZSTD_getBlockSize(long cctx)
-
nZSTD_compressBlock
public static long nZSTD_compressBlock(long cctx, long dst, long dstCapacity, long src, long srcSize)
-
ZSTD_compressBlock
public static long ZSTD_compressBlock(long cctx, java.nio.ByteBuffer dst, java.nio.ByteBuffer src)
-
nZSTD_decompressBlock
public static long nZSTD_decompressBlock(long dctx, long dst, long dstCapacity, long src, long srcSize)
-
ZSTD_decompressBlock
public static long ZSTD_decompressBlock(long dctx, java.nio.ByteBuffer dst, java.nio.ByteBuffer src)
-
nZSTD_insertBlock
public static long nZSTD_insertBlock(long dctx, long blockStart, long blockSize)Unsafe version of:insertBlock
-
ZSTD_insertBlock
public static long ZSTD_insertBlock(long dctx, java.nio.ByteBuffer blockStart)Insert uncompressed block intodctxhistory. Useful for multi-blocks decompression.
-
ZSTD_FRAMEHEADERSIZE_PREFIX
public static int ZSTD_FRAMEHEADERSIZE_PREFIX(int format)
-
ZSTD_FRAMEHEADERSIZE_MIN
public static int ZSTD_FRAMEHEADERSIZE_MIN(int format)
-
-