Class ZSTDFrameHeader

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ZSTDFrameHeader extends Struct<ZSTDFrameHeader> implements NativeResource

 struct ZSTD_FrameHeader {
     unsigned long long frameContentSize;
     unsigned long long windowSize;
     unsigned int blockSizeMax;
     ZSTD_FrameType_e frameType;
     unsigned int headerSize;
     unsigned int dictID;
     unsigned int checksumFlag;
     unsigned _reserved1;
     unsigned _reserved2;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • FRAMECONTENTSIZE

      public static final int FRAMECONTENTSIZE
      The struct member offsets.
    • WINDOWSIZE

      public static final int WINDOWSIZE
      The struct member offsets.
    • BLOCKSIZEMAX

      public static final int BLOCKSIZEMAX
      The struct member offsets.
    • FRAMETYPE

      public static final int FRAMETYPE
      The struct member offsets.
    • HEADERSIZE

      public static final int HEADERSIZE
      The struct member offsets.
    • DICTID

      public static final int DICTID
      The struct member offsets.
    • CHECKSUMFLAG

      public static final int CHECKSUMFLAG
      The struct member offsets.
    • _RESERVED1

      public static final int _RESERVED1
      The struct member offsets.
    • _RESERVED2

      public static final int _RESERVED2
      The struct member offsets.
  • Constructor Details

    • ZSTDFrameHeader

      public ZSTDFrameHeader(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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<ZSTDFrameHeader>
    • 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.
    • malloc

      public static ZSTDFrameHeader malloc()
      Returns a new ZSTDFrameHeader instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static ZSTDFrameHeader calloc()
      Returns a new ZSTDFrameHeader instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static ZSTDFrameHeader create()
      Returns a new ZSTDFrameHeader instance allocated with BufferUtils.
    • create

      public static ZSTDFrameHeader create(long address)
      Returns a new ZSTDFrameHeader instance for the specified memory address.
    • createSafe

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

      public static ZSTDFrameHeader.Buffer malloc(int capacity)
      Returns a new ZSTDFrameHeader.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static ZSTDFrameHeader.Buffer calloc(int capacity)
      Returns a new ZSTDFrameHeader.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static ZSTDFrameHeader.Buffer create(int capacity)
      Returns a new ZSTDFrameHeader.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • 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

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

      public static ZSTDFrameHeader malloc(MemoryStack stack)
      Returns a new ZSTDFrameHeader instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static ZSTDFrameHeader calloc(MemoryStack stack)
      Returns a new ZSTDFrameHeader instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static ZSTDFrameHeader.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new ZSTDFrameHeader.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static ZSTDFrameHeader.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new ZSTDFrameHeader.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • 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().
    • n_reserved1

      public static int n_reserved1(long struct)
    • n_reserved2

      public static int n_reserved2(long struct)