Class ZstdX


  • public class ZstdX
    extends java.lang.Object
    Native bindings to the experimental API of Zstandard (zstd).
    • Field Detail

      • ZSTD_f_zstd1, ZSTD_f_zstd1_magicless

        ZSTD_format_e
        Enum values:
        • 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.
      • ZSTD_WINDOWLOG_MIN

        public static final int ZSTD_WINDOWLOG_MIN
      • ZSTD_HASHLOG_MIN

        public static final int ZSTD_HASHLOG_MIN
      • ZSTD_CHAINLOG_MIN

        public static final int ZSTD_CHAINLOG_MIN
      • ZSTD_LDM_MINMATCH_MIN

        public static final int ZSTD_LDM_MINMATCH_MIN
      • ZSTD_c_rsyncable

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

      • 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 a CDict are used in place, or copied into the working context.

        Accepts values from the ZSTD_dictAttachPref_e enum.

      • ZSTD_c_literalCompressionMode

        Controlled with ZSTD_paramSwitch_e enum.
        • Default is ps_auto.
        • Set to ps_disable to never compress literals.
        • Set to ps_enable to 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.

      • ZSTD_c_targetCBlockSize

        Tries to fit compressed block size to be around targetCBlockSize.

        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 at CDict creation, and it must be set in a CCtxParams set passed into that construction (via createCDict_advanced2). A compression will then use the feature or not based on how the CDict was constructed; the value of this param, set in the CCtx, will have no effect.

        However, when a dictionary buffer is passed into a CCtx, such as via CCtx_loadDictionary, this param can be set on the CCtx to control whether the CDict that is created internally can use the feature or not.

        What it does:

        Normally, the internal data structures of the CDict are analogous to what would be stored in a CCtx after 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 the CDict are normally the same format as in the CCtx.

        It is possible to do better, since the CDict is not like a CCtx: the search structures are written once during CDict creation, and then are only read after that, while the search structures in the CCtx are 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_compressionParameters struct have different semantics and constraints in the dedicated search structure. It is highly recommended that you simply set a compression level in the CCtxParams you pass into the CDict creation call, and avoid messing with the cParams directly.

        Effects:

        This will only have any effect when the selected ZSTD_strategy implementation supports this feature. Currently, that's limited to greedy, lazy, and lazy2.

        Note that this means that the CDict tables can no longer be copied into the CCtx, so the dict attachment mode dictForceCopy will 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 CDict creation to be slightly slower. Eventually, we will probably make this mode the default.

      • ZSTD_c_stableInBuffer

        Experimental parameter. Default is 0 == disabled. Set to 1 to enable.

        Tells the compressor that the ZSTD_inBuffer will 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 is e_end, so zstd will error if ZSTD_e_end is not used. The data in the ZSTD_inBuffer in 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_inBuffer until the frame is complete. But, it will still allocate an output buffer large enough to fit a block (see c_stableOutBuffer). This will also avoid the memcpy() from the input buffer to the input window buffer.

        NOTE: compressStream2 will error if ZSTD_e_end is not used. That means this flag cannot be used with ZSTD_compressStream*().

        NOTE: So long as the ZSTD_inBuffer always 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_inBuffer in 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 the ZSTD_inBuffer to 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 is 0 == disabled. Set to 1 to enable.

        Tells he compressor that the ZSTD_outBuffer will 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 return error_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 (see c_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 is 0 == ZSTD_sf_noBlockDelimiters.

        For use with sequence compression API: compressSequences.

        Designates whether or not the given array of ZSTD_Sequence contains block delimiters and last literals, which are defined as sequences with offset == 0 and matchLength == 0. See the definition of ZSTD_Sequence for more specifics.

      • ZSTD_c_validateSequences

        Default is 0 == disabled. Set to 1 to enable sequence validation.

        For use with sequence compression API: compressSequences. Designates whether or not we validate sequences provided to ZSTD_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.md for specifics regarding offset/matchlength requirements) then the function will bail out and return an error.

      • ZSTD_c_useBlockSplitter

        Controlled with ZSTD_paramSwitch_e enum.

        By default, in ZSTD_ps_auto, the library will decide at runtime whether to use block splitting based on the compression parameters.

      • ZSTD_c_useRowMatchFinder

        Controlled with ZSTD_paramSwitch_e enum.
        • Default is ps_auto.
        • Set to ps_disable to never use row-based matchfinder.
        • Set to ps_enable to 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, and lazy2.

      • ZSTD_c_deterministicRefPrefix

        Default is 0 == 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_e input compression formats.

      • ZSTD_d_stableOutBuffer

        Experimental parameter. Default is 0 == disabled. Set to 1 to enable.

        Tells the decompressor that the ZSTD_outBuffer will 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 decompressor, and decompression will fail if it ever changes. Therefore the ZSTD_outBuffer MUST be large enough to fit the entire decompressed frame. This will be checked when the frame content size is known. The data in the ZSTD_outBuffer in 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 the memcpy() from the internal output buffer to the ZSTD_outBuffer. If you need to avoid the input buffer allocation use the buffer-less streaming API.

        NOTE: So long as the ZSTD_outBuffer always 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_outBuffer in 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 the ZSTD_outBuffer to 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 is 0 == disabled. Set to 1 to enable

        Tells 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 is 0 == disabled. Set to 1 to enable

        If enabled and dctx is allocated on the heap, then additional memory will be allocated to store references to multiple ZSTD_DDict. That is, multiple calls of DCtx_refDDict using a given ZSTD_DCtx, rather than overwriting the previous DDict reference, will instead store all references. At decompression time, the appropriate dictID is selected from the set of DDicts based on the dictID in 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. freeDCtx also frees this memory. Memory is allocated as per ZSTD_DCtx::customMem.

        Although this function allocates memory for the table, the user is still responsible for memory management of the underlying ZSTD_DDict themselves.

      • ZSTD_lcm_auto, ZSTD_lcm_huffman, ZSTD_lcm_uncompressed

        ZSTD_literalCompressionMode_e
        Enum 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_e

        This 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 to ZSTD_ps_enable or ZSTD_ps_disable allow 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.
    • 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 at srcSize bytes after src + 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. When 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.

        Parameters:
        src - should point to the start of a series of ZSTD encoded and/or skippable frames
        Returns:
      • 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 at src + srcSize)
      • ZSTD_decompressBound

        public static long ZSTD_decompressBound​(java.nio.ByteBuffer src)
        Note 1: an error can occur if 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)

        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_ERROR if an error occurred
      • 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 using compress2, given a source buffer.

        Each block will end with a dummy sequence with offset == 0, matchLength == 0, and litLength == length of last literals. litLength may be == 0, and if so, then the sequence of (of: 0 ml: 0 ll: 0) simply acts as a block delimiter.

        zc can be used to insert custom compression params. This function invokes compress2

        The output of this function can be fed into compressSequences with CCtx setting of c_blockDelimiters as sf_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 of ZSTD_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 compressSequences with CCtx setting of c_blockDelimiters as sf_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 of ZSTD_Sequence, generated from the original source buffer, into dst.

        If a dictionary is included, then the cctx should reference the dict. (see: CCtx_refCDict, CCtx_loadDictionary, etc.) The entire source is compressed into a single frame.

        The compression behavior changes based on cctx params. In particular:

        • If ZSTD_c_blockDelimiters == ZSTD_sf_noBlockDelimiters, the array of ZSTD_Sequence is expected to contain no block delimiters (defined in ZSTD_Sequence). Block boundaries are roughly determined based on the block size derived from the cctx, and sequences may be split. This is the default setting.
        • If ZSTD_c_blockDelimiters == ZSTD_sf_explicitBlockDelimiters, the array of ZSTD_Sequence is expected to contain block delimiters (defined in ZSTD_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. If ZSTD_c_validateSequences == 1, then if sequence is invalid (see doc/zstd_compression_format.md for 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_minMatch MUST be set as less than or equal to the smallest match generated by the match finder. It has a minimum value of MINMATCH_MIN.
        • c_compressionLevel accordingly adjusts the strength of the entropy coder, as it would in typical compression.
        • c_windowLog affects 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::rep is 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 repcode history.

        Returns:
        final compressed size or a ZSTD error.
      • 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 by src, and writes it to dst buffer.

        Skippable frames begin with a a 4-byte magic number. There are 16 possible choices of magic number, ranging from MAGIC_SKIPPABLE_START to ZSTD_MAGIC_SKIPPABLE_START+15. As such, the parameter magicVariant controls the exact skippable frame magic number variant used, so the magic number used will be ZSTD_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 magicVariant is 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 by src, and writes it to dst buffer.

        The parameter magicVariant will receive the magicVariant that was supplied when the frame was written, i.e. magicNumber - ZSTD_MAGIC_SKIPPABLE_START. This can be NULL if the caller is not interested in the magicVariant.

        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 of buffer starts with a valid Frame Identifier for a skippable frame.
      • ZSTD_estimateCCtxSize

        public static long ZSTD_estimateCCtxSize​(int compressionLevel)
        Estimages memory usage of a future CCtx, 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 srcSize can 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 functions estimateCCtxSize_usingCParams, which can be used in tandem with getCParams, and estimateCCtxSize_usingCCtxParams, which can be used in tandem with CCtxParams_setParameter. Both can be used to estimate memory using custom compression parameters and arbitrary srcSize limits.

        Note 2: only single-threaded compression is supported. estimateCCtxSize_usingCCtxParams will return an error code if c_nbWorkers is ≥ 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 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.

      • 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
      • 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_byRef
        dictContentType - 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_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 - accepts NULL pointer
      • 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 (use NULL argument 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
      • nZSTD_createDDict_advanced

        public static long nZSTD_createDDict_advanced​(long dict,
                                                      long dictSize,
                                                      int dictLoadMethod,
                                                      int dictContentType,
                                                      long customMem)
        Unsafe version of: createDDict_advanced
      • 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, 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.

      • 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)
        Returns ZSTD_compressionParameters structure for a selected compression level and estimated srcSize.
        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 full ZSTD_parameters object instead of sub-component ZSTD_compressionParameters.

        All fields of ZSTD_frameParameters are 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
      • nZSTD_CCtx_loadDictionary_byReference

        public static long nZSTD_CCtx_loadDictionary_byReference​(long cctx,
                                                                 long dict,
                                                                 long dictSize)
      • ZSTD_CCtx_loadDictionary_byReference

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

        It saves some memory, but also requires that dict outlives its usage within cctx.

      • 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 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 ?).
        Parameters:
        dictLoadMethod - one of:
        dlm_byCopydlm_byRef
        dictContentType - 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 as CCtx_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_createCCtxParams

        public static long ZSTD_createCCtxParams()
        Creates a ZSTD_CCtx_params structure.
      • ZSTD_freeCCtxParams

        public static long ZSTD_freeCCtxParams​(long params)
        Parameters:
        params - accepts NULL pointer
      • 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 of cctxParams according 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 of cctxParams according 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
      • nZSTD_CCtxParams_getParameter

        public static long nZSTD_CCtxParams_getParameter​(long params,
                                                         int param,
                                                         long value)
        Unsafe version of: CCtxParams_getParameter
      • nZSTD_CCtx_setParametersUsingCCtxParams

        public static long nZSTD_CCtx_setParametersUsingCCtxParams​(long cctx,
                                                                   long params)
      • ZSTD_CCtx_setParametersUsingCCtxParams

        public static long ZSTD_CCtx_setParametersUsingCCtxParams​(long cctx,
                                                                  long params)
        Applies a set of 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).

      • 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 as 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.

        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 of buffer starts with a valid Frame Identifier.

        Notes:

        1. Frame Identifier is 4 bytes. If size < 4, @return will always be 0.
        2. Legacy Frame Identifiers are considered valid only if Legacy Support is enabled.
        3. Skippable Frame Identifiers are considered valid.
      • 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 that dictBuffer outlives DDict, it must remain read accessible throughout the lifetime of DDict.

      • nZSTD_DCtx_loadDictionary_byReference

        public static long nZSTD_DCtx_loadDictionary_byReference​(long dctx,
                                                                 long dict,
                                                                 long dictSize)
      • ZSTD_DCtx_loadDictionary_byReference

        public static long ZSTD_DCtx_loadDictionary_byReference​(long dctx,
                                                                java.nio.ByteBuffer dict)
        Same as 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.

      • 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 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 ?).
        Parameters:
        dictLoadMethod - one of:
        dlm_byCopydlm_byRef
        dictContentType - 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 as DCtx_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 enum ZSTD_dParameter, and store it into int* 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 as 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.

      • 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.
      • 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, use CONTENTSIZE_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 larger srcSize.
        Returns:
        0, zfhPtr is correctly filled, >0, srcSize is too small, value is wanted srcSize amount, or an error code, which can be tested using isError
      • nZSTD_getFrameHeader_advanced

        public static long nZSTD_getFrameHeader_advanced​(long zfhPtr,
                                                         long src,
                                                         long srcSize,
                                                         int format)
        Unsafe version of: getFrameHeader_advanced
      • 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 into dctx history. 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)