Class ZSTDFrameHeader

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class ZSTDFrameHeader
    extends Struct
    implements NativeResource

    Member documentation

    • frameContentSize – if CONTENTSIZE_UNKNOWN, it means this field is not available. 0 means "empty"
    • windowSize – can be very large, up to ≤ frameContentSize
    • frameType – if skippableFrame, frameContentSize is the size of skippable content

    Layout

    
     struct ZSTD_frameHeader {
         unsigned long long frameContentSize;
         unsigned long long windowSize;
         unsigned blockSizeMax;
         ZSTD_frameType_e frameType;
         unsigned headerSize;
         unsigned dictID;
         unsigned checksumFlag;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • FRAMECONTENTSIZE, WINDOWSIZE, BLOCKSIZEMAX, FRAMETYPE, HEADERSIZE, DICTID, CHECKSUMFLAG

        The struct member offsets.
    • Constructor Detail

      • ZSTDFrameHeader

        public ZSTDFrameHeader​(java.nio.ByteBuffer container)
        Creates a ZSTDFrameHeader instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • frameContentSize

        public long frameContentSize()
        Returns the value of the frameContentSize field.
      • windowSize

        public long windowSize()
        Returns the value of the windowSize field.
      • blockSizeMax

        public int blockSizeMax()
        Returns the value of the blockSizeMax field.
      • frameType

        public int frameType()
        Returns the value of the frameType field.
      • headerSize

        public int headerSize()
        Returns the value of the headerSize field.
      • dictID

        public int dictID()
        Returns the value of the dictID field.
      • checksumFlag

        public int checksumFlag()
        Returns the value of the checksumFlag field.
      • createSafe

        @Nullable
        public static ZSTDFrameHeader createSafe​(long address)
        Like create, but returns null if address is NULL.
      • create

        public static ZSTDFrameHeader.Buffer create​(long address,
                                                    int capacity)
        Create a ZSTDFrameHeader.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static ZSTDFrameHeader.Buffer createSafe​(long address,
                                                        int capacity)
        Like create, but returns null if address is NULL.
      • nframeContentSize

        public static long nframeContentSize​(long struct)
        Unsafe version of frameContentSize().
      • nwindowSize

        public static long nwindowSize​(long struct)
        Unsafe version of windowSize().
      • nblockSizeMax

        public static int nblockSizeMax​(long struct)
        Unsafe version of blockSizeMax().
      • nframeType

        public static int nframeType​(long struct)
        Unsafe version of frameType().
      • nheaderSize

        public static int nheaderSize​(long struct)
        Unsafe version of headerSize().
      • ndictID

        public static int ndictID​(long struct)
        Unsafe version of dictID().
      • nchecksumFlag

        public static int nchecksumFlag​(long struct)
        Unsafe version of checksumFlag().