Package org.lwjgl.util.zstd
Class ZSTDOutBuffer
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.zstd.ZSTDOutBuffer
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class ZSTDOutBuffer extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceMember documentation
dst– start of output buffersize– size of output bufferpos– position where writing stopped. Will be updated. Necessarily0 <= pos <= size
Layout
struct ZSTD_outBuffer { void * dst; size_t size; size_t pos; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classZSTDOutBuffer.BufferAn array ofZSTDOutBufferstructs.
-
Constructor Summary
Constructors Constructor Description ZSTDOutBuffer(java.nio.ByteBuffer container)Creates aZSTDOutBufferinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ZSTDOutBuffercalloc()Returns a newZSTDOutBufferinstance allocated withmemCalloc.static ZSTDOutBuffer.Buffercalloc(int capacity)Returns a newZSTDOutBuffer.Bufferinstance allocated withmemCalloc.static ZSTDOutBuffercallocStack()Returns a newZSTDOutBufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static ZSTDOutBuffer.BuffercallocStack(int capacity)Returns a newZSTDOutBuffer.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static ZSTDOutBuffer.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newZSTDOutBuffer.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ZSTDOutBuffercallocStack(org.lwjgl.system.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 ZSTDOutBuffercreateSafe(long address)static ZSTDOutBuffer.BuffercreateSafe(long address, int capacity)java.nio.ByteBufferdst()Returns aByteBufferview of the data pointed to by thedstfield.ZSTDOutBufferdst(java.nio.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 ZSTDOutBuffermallocStack()Returns a newZSTDOutBufferinstance allocated on the thread-localMemoryStack.static ZSTDOutBuffer.BuffermallocStack(int capacity)Returns a newZSTDOutBuffer.Bufferinstance allocated on the thread-localMemoryStack.static ZSTDOutBuffer.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newZSTDOutBuffer.Bufferinstance allocated on the specifiedMemoryStack.static ZSTDOutBuffermallocStack(org.lwjgl.system.MemoryStack stack)Returns a newZSTDOutBufferinstance allocated on the specifiedMemoryStack.static java.nio.ByteBufferndst(long struct)Unsafe version ofdst.static voidndst(long struct, java.nio.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()Returns the value of theposfield.ZSTDOutBufferpos(long value)Sets the specified value to theposfield.ZSTDOutBufferset(java.nio.ByteBuffer dst, long pos)Initializes this struct with the specified values.ZSTDOutBufferset(ZSTDOutBuffer src)Copies the specified struct data to this struct.longsize()Returns the value of thesizefield.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
ZSTDOutBuffer
public ZSTDOutBuffer(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
dst
public java.nio.ByteBuffer dst()
Returns aByteBufferview of the data pointed to by thedstfield.
-
size
public long size()
Returns the value of thesizefield.
-
pos
public long pos()
Returns the value of theposfield.
-
dst
public ZSTDOutBuffer dst(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBufferto thedstfield.
-
pos
public ZSTDOutBuffer pos(long value)
Sets the specified value to theposfield.
-
set
public ZSTDOutBuffer set(java.nio.ByteBuffer dst, long pos)
Initializes this struct with the specified values.
-
set
public ZSTDOutBuffer set(ZSTDOutBuffer src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static ZSTDOutBuffer malloc()
Returns a newZSTDOutBufferinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static ZSTDOutBuffer calloc()
Returns a newZSTDOutBufferinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static ZSTDOutBuffer create()
Returns a newZSTDOutBufferinstance allocated withBufferUtils.
-
create
public static ZSTDOutBuffer create(long address)
Returns a newZSTDOutBufferinstance for the specified memory address.
-
createSafe
@Nullable public static ZSTDOutBuffer createSafe(long address)
-
malloc
public static ZSTDOutBuffer.Buffer malloc(int capacity)
Returns a newZSTDOutBuffer.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static ZSTDOutBuffer.Buffer calloc(int capacity)
Returns a newZSTDOutBuffer.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static ZSTDOutBuffer.Buffer create(int capacity)
Returns a newZSTDOutBuffer.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static ZSTDOutBuffer.Buffer create(long address, int capacity)
Create aZSTDOutBuffer.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static ZSTDOutBuffer.Buffer createSafe(long address, int capacity)
-
mallocStack
public static ZSTDOutBuffer mallocStack()
Returns a newZSTDOutBufferinstance allocated on the thread-localMemoryStack.
-
callocStack
public static ZSTDOutBuffer callocStack()
Returns a newZSTDOutBufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static ZSTDOutBuffer mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZSTDOutBufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static ZSTDOutBuffer callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZSTDOutBufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static ZSTDOutBuffer.Buffer mallocStack(int capacity)
Returns a newZSTDOutBuffer.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static ZSTDOutBuffer.Buffer callocStack(int capacity)
Returns a newZSTDOutBuffer.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static ZSTDOutBuffer.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZSTDOutBuffer.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static ZSTDOutBuffer.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZSTDOutBuffer.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
ndst
public static java.nio.ByteBuffer ndst(long struct)
Unsafe version ofdst.
-
nsize
public static long nsize(long struct)
Unsafe version ofsize().
-
npos
public static long npos(long struct)
Unsafe version ofpos().
-
ndst
public static void ndst(long struct, java.nio.ByteBuffer value)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
-
validate
public static void validate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-