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.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 int blockSizeMax; ZSTD_frameType_e frameType; unsigned int headerSize; unsigned int dictID; unsigned int checksumFlag; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ZSTDFrameHeader.Buffer
An array ofZSTDFrameHeader
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
BLOCKSIZEMAX
CHECKSUMFLAG
DICTID
FRAMECONTENTSIZE
FRAMETYPE
HEADERSIZEThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
WINDOWSIZE
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description ZSTDFrameHeader(java.nio.ByteBuffer container)
Creates aZSTDFrameHeader
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
blockSizeMax()
Returns the value of theblockSizeMax
field.static ZSTDFrameHeader
calloc()
Returns a newZSTDFrameHeader
instance allocated withmemCalloc
.static ZSTDFrameHeader.Buffer
calloc(int capacity)
Returns a newZSTDFrameHeader.Buffer
instance allocated withmemCalloc
.static ZSTDFrameHeader
callocStack()
Returns a newZSTDFrameHeader
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ZSTDFrameHeader.Buffer
callocStack(int capacity)
Returns a newZSTDFrameHeader.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ZSTDFrameHeader.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZSTDFrameHeader.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ZSTDFrameHeader
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZSTDFrameHeader
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
checksumFlag()
Returns the value of thechecksumFlag
field.static ZSTDFrameHeader
create()
Returns a newZSTDFrameHeader
instance allocated withBufferUtils
.static ZSTDFrameHeader.Buffer
create(int capacity)
Returns a newZSTDFrameHeader.Buffer
instance allocated withBufferUtils
.static ZSTDFrameHeader
create(long address)
Returns a newZSTDFrameHeader
instance for the specified memory address.static ZSTDFrameHeader.Buffer
create(long address, int capacity)
Create aZSTDFrameHeader.Buffer
instance at the specified memory.static ZSTDFrameHeader
createSafe(long address)
static ZSTDFrameHeader.Buffer
createSafe(long address, int capacity)
int
dictID()
Returns the value of thedictID
field.long
frameContentSize()
Returns the value of theframeContentSize
field.int
frameType()
Returns the value of theframeType
field.int
headerSize()
Returns the value of theheaderSize
field.static ZSTDFrameHeader
malloc()
Returns a newZSTDFrameHeader
instance allocated withmemAlloc
.static ZSTDFrameHeader.Buffer
malloc(int capacity)
Returns a newZSTDFrameHeader.Buffer
instance allocated withmemAlloc
.static ZSTDFrameHeader
mallocStack()
Returns a newZSTDFrameHeader
instance allocated on the thread-localMemoryStack
.static ZSTDFrameHeader.Buffer
mallocStack(int capacity)
Returns a newZSTDFrameHeader.Buffer
instance allocated on the thread-localMemoryStack
.static ZSTDFrameHeader.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZSTDFrameHeader.Buffer
instance allocated on the specifiedMemoryStack
.static ZSTDFrameHeader
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZSTDFrameHeader
instance allocated on the specifiedMemoryStack
.static int
nblockSizeMax(long struct)
Unsafe version ofblockSizeMax()
.static int
nchecksumFlag(long struct)
Unsafe version ofchecksumFlag()
.static int
ndictID(long struct)
Unsafe version ofdictID()
.static long
nframeContentSize(long struct)
Unsafe version offrameContentSize()
.static int
nframeType(long struct)
Unsafe version offrameType()
.static int
nheaderSize(long struct)
Unsafe version ofheaderSize()
.static long
nwindowSize(long struct)
Unsafe version ofwindowSize()
.int
sizeof()
long
windowSize()
Returns the value of thewindowSize
field.
-
-
-
Constructor Detail
-
ZSTDFrameHeader
public ZSTDFrameHeader(java.nio.ByteBuffer container)
Creates aZSTDFrameHeader
instance at the current position of the specifiedByteBuffer
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()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
frameContentSize
public long frameContentSize()
Returns the value of theframeContentSize
field.
-
windowSize
public long windowSize()
Returns the value of thewindowSize
field.
-
blockSizeMax
public int blockSizeMax()
Returns the value of theblockSizeMax
field.
-
frameType
public int frameType()
Returns the value of theframeType
field.
-
headerSize
public int headerSize()
Returns the value of theheaderSize
field.
-
dictID
public int dictID()
Returns the value of thedictID
field.
-
checksumFlag
public int checksumFlag()
Returns the value of thechecksumFlag
field.
-
malloc
public static ZSTDFrameHeader malloc()
Returns a newZSTDFrameHeader
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static ZSTDFrameHeader calloc()
Returns a newZSTDFrameHeader
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static ZSTDFrameHeader create()
Returns a newZSTDFrameHeader
instance allocated withBufferUtils
.
-
create
public static ZSTDFrameHeader create(long address)
Returns a newZSTDFrameHeader
instance for the specified memory address.
-
createSafe
@Nullable public static ZSTDFrameHeader createSafe(long address)
-
malloc
public static ZSTDFrameHeader.Buffer malloc(int capacity)
Returns a newZSTDFrameHeader.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static ZSTDFrameHeader.Buffer calloc(int capacity)
Returns a newZSTDFrameHeader.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static ZSTDFrameHeader.Buffer create(int capacity)
Returns a newZSTDFrameHeader.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static ZSTDFrameHeader.Buffer create(long address, int capacity)
Create aZSTDFrameHeader.Buffer
instance 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 newZSTDFrameHeader
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static ZSTDFrameHeader callocStack()
Returns a newZSTDFrameHeader
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static ZSTDFrameHeader mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZSTDFrameHeader
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static ZSTDFrameHeader callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZSTDFrameHeader
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static ZSTDFrameHeader.Buffer callocStack(int capacity)
Returns a newZSTDFrameHeader.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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()
.
-
-