Package org.lwjgl.util.zstd
Class ZSTDOutBuffer
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct ZSTD_outBuffer {
void * dst;
size_t size;
size_t pos;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionZSTDOutBuffer(ByteBuffer container) Creates aZSTDOutBufferinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic ZSTDOutBuffercalloc()Returns a newZSTDOutBufferinstance allocated withmemCalloc.static ZSTDOutBuffer.Buffercalloc(int capacity) Returns a newZSTDOutBuffer.Bufferinstance allocated withmemCalloc.static ZSTDOutBuffer.Buffercalloc(int capacity, MemoryStack stack) Returns a newZSTDOutBuffer.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ZSTDOutBuffercalloc(MemoryStack stack) Returns a newZSTDOutBufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ZSTDOutBuffercreate()Returns a newZSTDOutBufferinstance allocated withBufferUtils.static ZSTDOutBuffer.Buffercreate(int capacity) Returns a newZSTDOutBuffer.Bufferinstance allocated withBufferUtils.static ZSTDOutBuffercreate(long address) Returns a newZSTDOutBufferinstance for the specified memory address.static ZSTDOutBuffer.Buffercreate(long address, int capacity) Create aZSTDOutBuffer.Bufferinstance at the specified memory.static @Nullable ZSTDOutBuffercreateSafe(long address) static @Nullable ZSTDOutBuffer.BuffercreateSafe(long address, int capacity) dst()dst(ByteBuffer value) Sets the address of the specifiedByteBufferto thedstfield.static ZSTDOutBuffermalloc()Returns a newZSTDOutBufferinstance allocated withmemAlloc.static ZSTDOutBuffer.Buffermalloc(int capacity) Returns a newZSTDOutBuffer.Bufferinstance allocated withmemAlloc.static ZSTDOutBuffer.Buffermalloc(int capacity, MemoryStack stack) Returns a newZSTDOutBuffer.Bufferinstance allocated on the specifiedMemoryStack.static ZSTDOutBuffermalloc(MemoryStack stack) Returns a newZSTDOutBufferinstance allocated on the specifiedMemoryStack.static ByteBufferndst(long struct) Unsafe version ofdst.static voidndst(long struct, ByteBuffer value) Unsafe version ofdst.static longnpos(long struct) Unsafe version ofpos().static voidnpos(long struct, long value) Unsafe version ofpos.static longnsize(long struct) Unsafe version ofsize().static voidnsize(long struct, long value) Sets the specified value to thesizefield of the specifiedstruct.longpos()pos(long value) Sets the specified value to theposfield.set(ByteBuffer dst, long pos) Initializes this struct with the specified values.set(ZSTDOutBuffer src) Copies the specified struct data to this struct.longsize()intsizeof()Returnssizeof(struct).static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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 aZSTDOutBufferinstance 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<ZSTDOutBuffer>
-
dst
- Returns:
- a
ByteBufferview of the data pointed to by thedstfield.
-
size
public long size()- Returns:
- the value of the
sizefield.
-
pos
public long pos()- Returns:
- the value of the
posfield.
-
dst
Sets the address of the specifiedByteBufferto thedstfield. -
pos
Sets the specified value to theposfield. -
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 newZSTDOutBufferinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newZSTDOutBufferinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newZSTDOutBufferinstance allocated withBufferUtils. -
create
Returns a newZSTDOutBufferinstance for the specified memory address. -
createSafe
-
malloc
Returns a newZSTDOutBuffer.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newZSTDOutBuffer.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newZSTDOutBuffer.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aZSTDOutBuffer.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newZSTDOutBufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newZSTDOutBufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newZSTDOutBuffer.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newZSTDOutBuffer.Bufferinstance allocated on the specifiedMemoryStackand 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 thesizefield 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
-