Package org.lwjgl.util.zstd
Class ZSTDOutBuffer
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionZSTDOutBuffer
(ByteBuffer container) Creates aZSTDOutBuffer
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic ZSTDOutBuffer
calloc()
Returns a newZSTDOutBuffer
instance allocated withmemCalloc
.static ZSTDOutBuffer.Buffer
calloc
(int capacity) Returns a newZSTDOutBuffer.Buffer
instance allocated withmemCalloc
.static ZSTDOutBuffer.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newZSTDOutBuffer.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ZSTDOutBuffer
calloc
(MemoryStack stack) Returns a newZSTDOutBuffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ZSTDOutBuffer
Deprecated.static ZSTDOutBuffer.Buffer
callocStack
(int capacity) Deprecated.static ZSTDOutBuffer.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static ZSTDOutBuffer
callocStack
(MemoryStack stack) Deprecated.static ZSTDOutBuffer
create()
Returns a newZSTDOutBuffer
instance allocated withBufferUtils
.static ZSTDOutBuffer.Buffer
create
(int capacity) Returns a newZSTDOutBuffer.Buffer
instance allocated withBufferUtils
.static ZSTDOutBuffer
create
(long address) Returns a newZSTDOutBuffer
instance for the specified memory address.static ZSTDOutBuffer.Buffer
create
(long address, int capacity) Create aZSTDOutBuffer.Buffer
instance at the specified memory.static ZSTDOutBuffer
createSafe
(long address) static ZSTDOutBuffer.Buffer
createSafe
(long address, int capacity) dst()
start of output bufferdst
(ByteBuffer value) Sets the address of the specifiedByteBuffer
to thedst()
field.static ZSTDOutBuffer
malloc()
Returns a newZSTDOutBuffer
instance allocated withmemAlloc
.static ZSTDOutBuffer.Buffer
malloc
(int capacity) Returns a newZSTDOutBuffer.Buffer
instance allocated withmemAlloc
.static ZSTDOutBuffer.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newZSTDOutBuffer.Buffer
instance allocated on the specifiedMemoryStack
.static ZSTDOutBuffer
malloc
(MemoryStack stack) Returns a newZSTDOutBuffer
instance allocated on the specifiedMemoryStack
.static ZSTDOutBuffer
Deprecated.static ZSTDOutBuffer.Buffer
mallocStack
(int capacity) Deprecated.static ZSTDOutBuffer.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static ZSTDOutBuffer
mallocStack
(MemoryStack stack) Deprecated.static ByteBuffer
ndst
(long struct) Unsafe version ofdst
.static void
ndst
(long struct, ByteBuffer value) Unsafe version ofdst
.static long
npos
(long struct) Unsafe version ofpos()
.static void
npos
(long struct, long value) Unsafe version ofpos
.static long
nsize
(long struct) Unsafe version ofsize()
.static void
nsize
(long struct, long value) Sets the specified value to thesize
field of the specifiedstruct
.long
pos()
position where writing stopped.pos
(long value) Sets the specified value to thepos()
field.set
(ByteBuffer dst, long pos) Initializes this struct with the specified values.set
(ZSTDOutBuffer src) Copies the specified struct data to this struct.long
size()
size of output bufferint
sizeof()
Returnssizeof(struct)
.static void
validate
(long struct) Validates pointer members that should not beNULL
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
DST
public static final int DSTThe struct member offsets. -
SIZE
public static final int SIZEThe struct member offsets. -
POS
public static final int POSThe struct member offsets.
-
-
Constructor Details
-
ZSTDOutBuffer
Creates aZSTDOutBuffer
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<ZSTDOutBuffer>
-
dst
start of output buffer -
size
public long size()size of output buffer -
pos
public long pos()position where writing stopped. Will be updated. Necessarily 0 ≤pos
≤size
-
dst
Sets the address of the specifiedByteBuffer
to thedst()
field. -
pos
Sets the specified value to thepos()
field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newZSTDOutBuffer
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newZSTDOutBuffer
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newZSTDOutBuffer
instance allocated withBufferUtils
. -
create
Returns a newZSTDOutBuffer
instance for the specified memory address. -
createSafe
-
malloc
Returns a newZSTDOutBuffer.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newZSTDOutBuffer.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newZSTDOutBuffer.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aZSTDOutBuffer.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newZSTDOutBuffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newZSTDOutBuffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newZSTDOutBuffer.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newZSTDOutBuffer.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
ndst
Unsafe version ofdst
. -
nsize
public static long nsize(long struct) Unsafe version ofsize()
. -
npos
public static long npos(long struct) Unsafe version ofpos()
. -
ndst
Unsafe version ofdst
. -
nsize
public static void nsize(long struct, long value) Sets the specified value to thesize
field of the specifiedstruct
. -
npos
public static void npos(long struct, long value) Unsafe version ofpos
. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-