Package org.lwjgl.util.zstd
Class ZSTDFrameHeader
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.zstd.ZSTDFrameHeader
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class ZSTDFrameHeader extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceMember documentation
frameContentSize– ifCONTENTSIZE_UNKNOWN, it means this field is not available. 0 means "empty"windowSize– can be very large, up to ≤frameContentSizeframeType– ifskippableFrame,frameContentSizeis 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; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classZSTDFrameHeader.BufferAn array ofZSTDFrameHeaderstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intBLOCKSIZEMAX
CHECKSUMFLAG
DICTID
FRAMECONTENTSIZE
FRAMETYPE
HEADERSIZEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intWINDOWSIZEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description ZSTDFrameHeader(java.nio.ByteBuffer container)Creates aZSTDFrameHeaderinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intblockSizeMax()Returns the value of theblockSizeMaxfield.static ZSTDFrameHeadercalloc()Returns a newZSTDFrameHeaderinstance allocated withmemCalloc.static ZSTDFrameHeader.Buffercalloc(int capacity)Returns a newZSTDFrameHeader.Bufferinstance allocated withmemCalloc.static ZSTDFrameHeadercallocStack()Returns a newZSTDFrameHeaderinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static ZSTDFrameHeader.BuffercallocStack(int capacity)Returns a newZSTDFrameHeader.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static ZSTDFrameHeader.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newZSTDFrameHeader.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ZSTDFrameHeadercallocStack(org.lwjgl.system.MemoryStack stack)Returns a newZSTDFrameHeaderinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intchecksumFlag()Returns the value of thechecksumFlagfield.static ZSTDFrameHeadercreate()Returns a newZSTDFrameHeaderinstance allocated withBufferUtils.static ZSTDFrameHeader.Buffercreate(int capacity)Returns a newZSTDFrameHeader.Bufferinstance allocated withBufferUtils.static ZSTDFrameHeadercreate(long address)Returns a newZSTDFrameHeaderinstance for the specified memory address.static ZSTDFrameHeader.Buffercreate(long address, int capacity)Create aZSTDFrameHeader.Bufferinstance at the specified memory.static ZSTDFrameHeadercreateSafe(long address)static ZSTDFrameHeader.BuffercreateSafe(long address, int capacity)intdictID()Returns the value of thedictIDfield.longframeContentSize()Returns the value of theframeContentSizefield.intframeType()Returns the value of theframeTypefield.intheaderSize()Returns the value of theheaderSizefield.static ZSTDFrameHeadermalloc()Returns a newZSTDFrameHeaderinstance allocated withmemAlloc.static ZSTDFrameHeader.Buffermalloc(int capacity)Returns a newZSTDFrameHeader.Bufferinstance allocated withmemAlloc.static ZSTDFrameHeadermallocStack()Returns a newZSTDFrameHeaderinstance allocated on the thread-localMemoryStack.static ZSTDFrameHeader.BuffermallocStack(int capacity)Returns a newZSTDFrameHeader.Bufferinstance allocated on the thread-localMemoryStack.static ZSTDFrameHeader.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newZSTDFrameHeader.Bufferinstance allocated on the specifiedMemoryStack.static ZSTDFrameHeadermallocStack(org.lwjgl.system.MemoryStack stack)Returns a newZSTDFrameHeaderinstance allocated on the specifiedMemoryStack.static intnblockSizeMax(long struct)Unsafe version ofblockSizeMax().static intnchecksumFlag(long struct)Unsafe version ofchecksumFlag().static intndictID(long struct)Unsafe version ofdictID().static longnframeContentSize(long struct)Unsafe version offrameContentSize().static intnframeType(long struct)Unsafe version offrameType().static intnheaderSize(long struct)Unsafe version ofheaderSize().static longnwindowSize(long struct)Unsafe version ofwindowSize().intsizeof()longwindowSize()Returns the value of thewindowSizefield.
-
-
-
Constructor Detail
-
ZSTDFrameHeader
public ZSTDFrameHeader(java.nio.ByteBuffer container)
Creates aZSTDFrameHeaderinstance at the current position of the specifiedByteBuffercontainer. 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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
frameContentSize
public long frameContentSize()
Returns the value of theframeContentSizefield.
-
windowSize
public long windowSize()
Returns the value of thewindowSizefield.
-
blockSizeMax
public int blockSizeMax()
Returns the value of theblockSizeMaxfield.
-
frameType
public int frameType()
Returns the value of theframeTypefield.
-
headerSize
public int headerSize()
Returns the value of theheaderSizefield.
-
dictID
public int dictID()
Returns the value of thedictIDfield.
-
checksumFlag
public int checksumFlag()
Returns the value of thechecksumFlagfield.
-
malloc
public static ZSTDFrameHeader malloc()
Returns a newZSTDFrameHeaderinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static ZSTDFrameHeader calloc()
Returns a newZSTDFrameHeaderinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static ZSTDFrameHeader create()
Returns a newZSTDFrameHeaderinstance allocated withBufferUtils.
-
create
public static ZSTDFrameHeader create(long address)
Returns a newZSTDFrameHeaderinstance for the specified memory address.
-
createSafe
@Nullable public static ZSTDFrameHeader createSafe(long address)
-
malloc
public static ZSTDFrameHeader.Buffer malloc(int capacity)
Returns a newZSTDFrameHeader.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static ZSTDFrameHeader.Buffer calloc(int capacity)
Returns a newZSTDFrameHeader.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static ZSTDFrameHeader.Buffer create(int capacity)
Returns a newZSTDFrameHeader.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static ZSTDFrameHeader.Buffer create(long address, int capacity)
Create aZSTDFrameHeader.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static ZSTDFrameHeader.Buffer createSafe(long address, int capacity)
-
mallocStack
public static ZSTDFrameHeader mallocStack()
Returns a newZSTDFrameHeaderinstance allocated on the thread-localMemoryStack.
-
callocStack
public static ZSTDFrameHeader callocStack()
Returns a newZSTDFrameHeaderinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static ZSTDFrameHeader mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZSTDFrameHeaderinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static ZSTDFrameHeader callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZSTDFrameHeaderinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static ZSTDFrameHeader.Buffer mallocStack(int capacity)
Returns a newZSTDFrameHeader.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static ZSTDFrameHeader.Buffer callocStack(int capacity)
Returns a newZSTDFrameHeader.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static ZSTDFrameHeader.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZSTDFrameHeader.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static ZSTDFrameHeader.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZSTDFrameHeader.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nframeContentSize
public static long nframeContentSize(long struct)
Unsafe version offrameContentSize().
-
nwindowSize
public static long nwindowSize(long struct)
Unsafe version ofwindowSize().
-
nblockSizeMax
public static int nblockSizeMax(long struct)
Unsafe version ofblockSizeMax().
-
nframeType
public static int nframeType(long struct)
Unsafe version offrameType().
-
nheaderSize
public static int nheaderSize(long struct)
Unsafe version ofheaderSize().
-
ndictID
public static int ndictID(long struct)
Unsafe version ofdictID().
-
nchecksumFlag
public static int nchecksumFlag(long struct)
Unsafe version ofchecksumFlag().
-
-