Package org.lwjgl.util.zstd
Class ZSTDInBuffer
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.zstd.ZSTDInBuffer
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class ZSTDInBuffer extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceMember documentation
src– start of input buffersize– size of input bufferpos– position where reading stopped. Will be updated. Necessarily0 <= pos <= size
Layout
struct ZSTD_inBuffer { void const * src; size_t size; size_t pos; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classZSTDInBuffer.BufferAn array ofZSTDInBufferstructs.
-
Constructor Summary
Constructors Constructor Description ZSTDInBuffer(java.nio.ByteBuffer container)Creates aZSTDInBufferinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ZSTDInBuffercalloc()Returns a newZSTDInBufferinstance allocated withmemCalloc.static ZSTDInBuffer.Buffercalloc(int capacity)Returns a newZSTDInBuffer.Bufferinstance allocated withmemCalloc.static ZSTDInBuffercallocStack()Returns a newZSTDInBufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static ZSTDInBuffer.BuffercallocStack(int capacity)Returns a newZSTDInBuffer.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static ZSTDInBuffer.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newZSTDInBuffer.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ZSTDInBuffercallocStack(org.lwjgl.system.MemoryStack stack)Returns a newZSTDInBufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ZSTDInBuffercreate()Returns a newZSTDInBufferinstance allocated withBufferUtils.static ZSTDInBuffer.Buffercreate(int capacity)Returns a newZSTDInBuffer.Bufferinstance allocated withBufferUtils.static ZSTDInBuffercreate(long address)Returns a newZSTDInBufferinstance for the specified memory address.static ZSTDInBuffer.Buffercreate(long address, int capacity)Create aZSTDInBuffer.Bufferinstance at the specified memory.static ZSTDInBuffercreateSafe(long address)static ZSTDInBuffer.BuffercreateSafe(long address, int capacity)static ZSTDInBuffermalloc()Returns a newZSTDInBufferinstance allocated withmemAlloc.static ZSTDInBuffer.Buffermalloc(int capacity)Returns a newZSTDInBuffer.Bufferinstance allocated withmemAlloc.static ZSTDInBuffermallocStack()Returns a newZSTDInBufferinstance allocated on the thread-localMemoryStack.static ZSTDInBuffer.BuffermallocStack(int capacity)Returns a newZSTDInBuffer.Bufferinstance allocated on the thread-localMemoryStack.static ZSTDInBuffer.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newZSTDInBuffer.Bufferinstance allocated on the specifiedMemoryStack.static ZSTDInBuffermallocStack(org.lwjgl.system.MemoryStack stack)Returns a newZSTDInBufferinstance allocated on the specifiedMemoryStack.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.static java.nio.ByteBuffernsrc(long struct)Unsafe version ofsrc.static voidnsrc(long struct, java.nio.ByteBuffer value)Unsafe version ofsrc.longpos()Returns the value of theposfield.ZSTDInBufferpos(long value)Sets the specified value to theposfield.ZSTDInBufferset(java.nio.ByteBuffer src, long pos)Initializes this struct with the specified values.ZSTDInBufferset(ZSTDInBuffer src)Copies the specified struct data to this struct.longsize()Returns the value of thesizefield.intsizeof()java.nio.ByteBuffersrc()Returns aByteBufferview of the data pointed to by thesrcfield.ZSTDInBuffersrc(java.nio.ByteBuffer value)Sets the address of the specifiedByteBufferto thesrcfield.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
-
ZSTDInBuffer
public ZSTDInBuffer(java.nio.ByteBuffer container)
Creates aZSTDInBufferinstance 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
-
src
public java.nio.ByteBuffer src()
Returns aByteBufferview of the data pointed to by thesrcfield.
-
size
public long size()
Returns the value of thesizefield.
-
pos
public long pos()
Returns the value of theposfield.
-
src
public ZSTDInBuffer src(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBufferto thesrcfield.
-
pos
public ZSTDInBuffer pos(long value)
Sets the specified value to theposfield.
-
set
public ZSTDInBuffer set(java.nio.ByteBuffer src, long pos)
Initializes this struct with the specified values.
-
set
public ZSTDInBuffer set(ZSTDInBuffer src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static ZSTDInBuffer malloc()
Returns a newZSTDInBufferinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static ZSTDInBuffer calloc()
Returns a newZSTDInBufferinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static ZSTDInBuffer create()
Returns a newZSTDInBufferinstance allocated withBufferUtils.
-
create
public static ZSTDInBuffer create(long address)
Returns a newZSTDInBufferinstance for the specified memory address.
-
createSafe
@Nullable public static ZSTDInBuffer createSafe(long address)
-
malloc
public static ZSTDInBuffer.Buffer malloc(int capacity)
Returns a newZSTDInBuffer.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static ZSTDInBuffer.Buffer calloc(int capacity)
Returns a newZSTDInBuffer.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static ZSTDInBuffer.Buffer create(int capacity)
Returns a newZSTDInBuffer.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static ZSTDInBuffer.Buffer create(long address, int capacity)
Create aZSTDInBuffer.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static ZSTDInBuffer.Buffer createSafe(long address, int capacity)
-
mallocStack
public static ZSTDInBuffer mallocStack()
Returns a newZSTDInBufferinstance allocated on the thread-localMemoryStack.
-
callocStack
public static ZSTDInBuffer callocStack()
Returns a newZSTDInBufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static ZSTDInBuffer mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZSTDInBufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static ZSTDInBuffer callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZSTDInBufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static ZSTDInBuffer.Buffer mallocStack(int capacity)
Returns a newZSTDInBuffer.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static ZSTDInBuffer.Buffer callocStack(int capacity)
Returns a newZSTDInBuffer.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static ZSTDInBuffer.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZSTDInBuffer.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static ZSTDInBuffer.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZSTDInBuffer.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsrc
public static java.nio.ByteBuffer nsrc(long struct)
Unsafe version ofsrc.
-
nsize
public static long nsize(long struct)
Unsafe version ofsize().
-
npos
public static long npos(long struct)
Unsafe version ofpos().
-
nsrc
public static void nsrc(long struct, java.nio.ByteBuffer value)Unsafe version ofsrc.
-
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
-
-