Package org.lwjgl.util.zstd
Class ZDICTParams
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.zstd.ZDICTParams
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,NativeResource
,Pointer
public class ZDICTParams extends Struct implements NativeResource
Member documentation
compressionLevel
– optimize for a specific zstd compression level; 0 means defaultnotificationLevel
– write log tostderr
; 0 = none (default); 1 = errors; 2 = progression; 3 = details; 4 = debug;dictID
– forcedictID
value; 0 means auto mode (32-bits random value)
Layout
struct ZDICT_params_t { int compressionLevel; unsigned notificationLevel; unsigned dictID; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ZDICTParams.Buffer
An array ofZDICTParams
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
COMPRESSIONLEVEL
DICTID
NOTIFICATIONLEVELThe struct member offsets.static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor Description ZDICTParams(java.nio.ByteBuffer container)
Creates aZDICTParams
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ZDICTParams
calloc()
Returns a newZDICTParams
instance allocated withmemCalloc
.static ZDICTParams.Buffer
calloc(int capacity)
Returns a newZDICTParams.Buffer
instance allocated withmemCalloc
.static ZDICTParams
callocStack()
Returns a newZDICTParams
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ZDICTParams.Buffer
callocStack(int capacity)
Returns a newZDICTParams.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ZDICTParams.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newZDICTParams.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ZDICTParams
callocStack(MemoryStack stack)
Returns a newZDICTParams
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
compressionLevel()
Returns the value of thecompressionLevel
field.ZDICTParams
compressionLevel(int value)
Sets the specified value to thecompressionLevel
field.static ZDICTParams
create()
Returns a newZDICTParams
instance allocated withBufferUtils
.static ZDICTParams.Buffer
create(int capacity)
Returns a newZDICTParams.Buffer
instance allocated withBufferUtils
.static ZDICTParams
create(long address)
Returns a newZDICTParams
instance for the specified memory address.static ZDICTParams.Buffer
create(long address, int capacity)
Create aZDICTParams.Buffer
instance at the specified memory.static ZDICTParams
createSafe(long address)
static ZDICTParams.Buffer
createSafe(long address, int capacity)
int
dictID()
Returns the value of thedictID
field.ZDICTParams
dictID(int value)
Sets the specified value to thedictID
field.static ZDICTParams
malloc()
Returns a newZDICTParams
instance allocated withmemAlloc
.static ZDICTParams.Buffer
malloc(int capacity)
Returns a newZDICTParams.Buffer
instance allocated withmemAlloc
.static ZDICTParams
mallocStack()
Returns a newZDICTParams
instance allocated on the thread-localMemoryStack
.static ZDICTParams.Buffer
mallocStack(int capacity)
Returns a newZDICTParams.Buffer
instance allocated on the thread-localMemoryStack
.static ZDICTParams.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newZDICTParams.Buffer
instance allocated on the specifiedMemoryStack
.static ZDICTParams
mallocStack(MemoryStack stack)
Returns a newZDICTParams
instance allocated on the specifiedMemoryStack
.static int
ncompressionLevel(long struct)
Unsafe version ofcompressionLevel()
.static void
ncompressionLevel(long struct, int value)
Unsafe version ofcompressionLevel
.static int
ndictID(long struct)
Unsafe version ofdictID()
.static void
ndictID(long struct, int value)
Unsafe version ofdictID
.static int
nnotificationLevel(long struct)
Unsafe version ofnotificationLevel()
.static void
nnotificationLevel(long struct, int value)
Unsafe version ofnotificationLevel
.int
notificationLevel()
Returns the value of thenotificationLevel
field.ZDICTParams
notificationLevel(int value)
Sets the specified value to thenotificationLevel
field.ZDICTParams
set(int compressionLevel, int notificationLevel, int dictID)
Initializes this struct with the specified values.ZDICTParams
set(ZDICTParams src)
Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.-
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
-
-
-
Constructor Detail
-
ZDICTParams
public ZDICTParams(java.nio.ByteBuffer container)
Creates aZDICTParams
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()
Description copied from class:Struct
Returnssizeof(struct)
.
-
compressionLevel
public int compressionLevel()
Returns the value of thecompressionLevel
field.
-
notificationLevel
public int notificationLevel()
Returns the value of thenotificationLevel
field.
-
dictID
public int dictID()
Returns the value of thedictID
field.
-
compressionLevel
public ZDICTParams compressionLevel(int value)
Sets the specified value to thecompressionLevel
field.
-
notificationLevel
public ZDICTParams notificationLevel(int value)
Sets the specified value to thenotificationLevel
field.
-
dictID
public ZDICTParams dictID(int value)
Sets the specified value to thedictID
field.
-
set
public ZDICTParams set(int compressionLevel, int notificationLevel, int dictID)
Initializes this struct with the specified values.
-
set
public ZDICTParams set(ZDICTParams src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static ZDICTParams malloc()
Returns a newZDICTParams
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static ZDICTParams calloc()
Returns a newZDICTParams
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static ZDICTParams create()
Returns a newZDICTParams
instance allocated withBufferUtils
.
-
create
public static ZDICTParams create(long address)
Returns a newZDICTParams
instance for the specified memory address.
-
createSafe
@Nullable public static ZDICTParams createSafe(long address)
-
malloc
public static ZDICTParams.Buffer malloc(int capacity)
Returns a newZDICTParams.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static ZDICTParams.Buffer calloc(int capacity)
Returns a newZDICTParams.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static ZDICTParams.Buffer create(int capacity)
Returns a newZDICTParams.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static ZDICTParams.Buffer create(long address, int capacity)
Create aZDICTParams.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static ZDICTParams.Buffer createSafe(long address, int capacity)
-
mallocStack
public static ZDICTParams mallocStack()
Returns a newZDICTParams
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static ZDICTParams callocStack()
Returns a newZDICTParams
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static ZDICTParams mallocStack(MemoryStack stack)
Returns a newZDICTParams
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static ZDICTParams callocStack(MemoryStack stack)
Returns a newZDICTParams
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static ZDICTParams.Buffer mallocStack(int capacity)
Returns a newZDICTParams.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static ZDICTParams.Buffer callocStack(int capacity)
Returns a newZDICTParams.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static ZDICTParams.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newZDICTParams.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static ZDICTParams.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newZDICTParams.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
ncompressionLevel
public static int ncompressionLevel(long struct)
Unsafe version ofcompressionLevel()
.
-
nnotificationLevel
public static int nnotificationLevel(long struct)
Unsafe version ofnotificationLevel()
.
-
ndictID
public static int ndictID(long struct)
Unsafe version ofdictID()
.
-
ncompressionLevel
public static void ncompressionLevel(long struct, int value)
Unsafe version ofcompressionLevel
.
-
nnotificationLevel
public static void nnotificationLevel(long struct, int value)
Unsafe version ofnotificationLevel
.
-
ndictID
public static void ndictID(long struct, int value)
Unsafe version ofdictID
.
-
-