public class LZ4FPreferences
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
memset(),
setting all parameters to default. All reserved fields must be set to zero.
compressionLevel – 0: default (fast mode); values > CLEVEL_MAX count as CLEVEL_MAX; values > 0 trigger "fast acceleration"autoFlush – 1: always flush, reduces usage of internal buffersfavorDecSpeed – 1: parser favors decompression speed vs compression ratio. Only works for high compression modes (≥ CLEVEL_OPT_MIN). Since version 1.8.2.reserved[3] – must be zero for forward compatibility
struct LZ4F_preferences_t {
LZ4F_frameInfo_t frameInfo;
int compressionLevel;
unsigned autoFlush;
unsigned favorDecSpeed;
unsigned reserved[3];
}| Modifier and Type | Class and Description |
|---|---|
static class |
LZ4FPreferences.Buffer
An array of
LZ4FPreferences structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
AUTOFLUSH
The struct member offsets.
|
static int |
COMPRESSIONLEVEL
The struct member offsets.
|
static int |
FAVORDECSPEED
The struct member offsets.
|
static int |
FRAMEINFO
The struct member offsets.
|
static int |
RESERVED
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
LZ4FPreferences(java.nio.ByteBuffer container)
Creates a
LZ4FPreferences instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
autoFlush()
Returns the value of the
autoFlush field. |
LZ4FPreferences |
autoFlush(boolean value)
Sets the specified value to the
autoFlush field. |
static LZ4FPreferences |
calloc()
Returns a new
LZ4FPreferences instance allocated with memCalloc. |
static LZ4FPreferences.Buffer |
calloc(int capacity)
Returns a new
LZ4FPreferences.Buffer instance allocated with memCalloc. |
static LZ4FPreferences |
callocStack()
Returns a new
LZ4FPreferences instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static LZ4FPreferences.Buffer |
callocStack(int capacity)
Returns a new
LZ4FPreferences.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static LZ4FPreferences.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
LZ4FPreferences.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static LZ4FPreferences |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
LZ4FPreferences instance allocated on the specified MemoryStack and initializes all its bits to zero. |
int |
compressionLevel()
Returns the value of the
compressionLevel field. |
LZ4FPreferences |
compressionLevel(int value)
Sets the specified value to the
compressionLevel field. |
static LZ4FPreferences |
create()
Returns a new
LZ4FPreferences instance allocated with BufferUtils. |
static LZ4FPreferences.Buffer |
create(int capacity)
Returns a new
LZ4FPreferences.Buffer instance allocated with BufferUtils. |
static LZ4FPreferences |
create(long address)
Returns a new
LZ4FPreferences instance for the specified memory address. |
static LZ4FPreferences.Buffer |
create(long address,
int capacity)
Create a
LZ4FPreferences.Buffer instance at the specified memory. |
static LZ4FPreferences |
createSafe(long address)
|
static LZ4FPreferences.Buffer |
createSafe(long address,
int capacity)
|
boolean |
favorDecSpeed()
Returns the value of the
favorDecSpeed field. |
LZ4FPreferences |
favorDecSpeed(boolean value)
Sets the specified value to the
favorDecSpeed field. |
LZ4FFrameInfo |
frameInfo()
Returns a
LZ4FFrameInfo view of the frameInfo field. |
LZ4FPreferences |
frameInfo(java.util.function.Consumer<LZ4FFrameInfo> consumer)
Passes the
frameInfo field to the specified Consumer. |
LZ4FPreferences |
frameInfo(LZ4FFrameInfo value)
Copies the specified
LZ4FFrameInfo to the frameInfo field. |
static LZ4FPreferences |
malloc()
Returns a new
LZ4FPreferences instance allocated with memAlloc. |
static LZ4FPreferences.Buffer |
malloc(int capacity)
Returns a new
LZ4FPreferences.Buffer instance allocated with memAlloc. |
static LZ4FPreferences |
mallocStack()
Returns a new
LZ4FPreferences instance allocated on the thread-local MemoryStack. |
static LZ4FPreferences.Buffer |
mallocStack(int capacity)
Returns a new
LZ4FPreferences.Buffer instance allocated on the thread-local MemoryStack. |
static LZ4FPreferences.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
LZ4FPreferences.Buffer instance allocated on the specified MemoryStack. |
static LZ4FPreferences |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
LZ4FPreferences instance allocated on the specified MemoryStack. |
static int |
nautoFlush(long struct)
Unsafe version of
autoFlush(). |
static void |
nautoFlush(long struct,
int value)
Unsafe version of
autoFlush. |
static int |
ncompressionLevel(long struct)
Unsafe version of
compressionLevel(). |
static void |
ncompressionLevel(long struct,
int value)
Unsafe version of
compressionLevel. |
static int |
nfavorDecSpeed(long struct)
Unsafe version of
favorDecSpeed(). |
static void |
nfavorDecSpeed(long struct,
int value)
Unsafe version of
favorDecSpeed. |
static LZ4FFrameInfo |
nframeInfo(long struct)
Unsafe version of
frameInfo(). |
static void |
nframeInfo(long struct,
LZ4FFrameInfo value)
Unsafe version of
frameInfo. |
static java.nio.IntBuffer |
nreserved(long struct)
Unsafe version of
reserved(). |
static int |
nreserved(long struct,
int index)
Unsafe version of
reserved. |
static void |
nreserved(long struct,
java.nio.IntBuffer value)
Unsafe version of
reserved. |
static void |
nreserved(long struct,
int index,
int value)
Unsafe version of
reserved. |
java.nio.IntBuffer |
reserved()
Returns a
IntBuffer view of the reserved field. |
int |
reserved(int index)
Returns the value at the specified index of the
reserved field. |
LZ4FPreferences |
reserved(java.nio.IntBuffer value)
Copies the specified
IntBuffer to the reserved field. |
LZ4FPreferences |
reserved(int index,
int value)
Sets the specified value at the specified index of the
reserved field. |
LZ4FPreferences |
set(LZ4FFrameInfo frameInfo,
int compressionLevel,
boolean autoFlush,
boolean favorDecSpeed,
java.nio.IntBuffer reserved)
Initializes this struct with the specified values.
|
LZ4FPreferences |
set(LZ4FPreferences src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int FRAMEINFO
public static final int COMPRESSIONLEVEL
public static final int AUTOFLUSH
public static final int FAVORDECSPEED
public static final int RESERVED
public LZ4FPreferences(java.nio.ByteBuffer container)
LZ4FPreferences instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic LZ4FFrameInfo frameInfo()
LZ4FFrameInfo view of the frameInfo field.public int compressionLevel()
compressionLevel field.public boolean autoFlush()
autoFlush field.public boolean favorDecSpeed()
favorDecSpeed field.public java.nio.IntBuffer reserved()
IntBuffer view of the reserved field.public int reserved(int index)
reserved field.public LZ4FPreferences frameInfo(LZ4FFrameInfo value)
LZ4FFrameInfo to the frameInfo field.public LZ4FPreferences frameInfo(java.util.function.Consumer<LZ4FFrameInfo> consumer)
frameInfo field to the specified Consumer.public LZ4FPreferences compressionLevel(int value)
compressionLevel field.public LZ4FPreferences autoFlush(boolean value)
autoFlush field.public LZ4FPreferences favorDecSpeed(boolean value)
favorDecSpeed field.public LZ4FPreferences reserved(java.nio.IntBuffer value)
IntBuffer to the reserved field.public LZ4FPreferences reserved(int index, int value)
reserved field.public LZ4FPreferences set(LZ4FFrameInfo frameInfo, int compressionLevel, boolean autoFlush, boolean favorDecSpeed, java.nio.IntBuffer reserved)
public LZ4FPreferences set(LZ4FPreferences src)
src - the source structpublic static LZ4FPreferences malloc()
LZ4FPreferences instance allocated with memAlloc. The instance must be explicitly freed.public static LZ4FPreferences calloc()
LZ4FPreferences instance allocated with memCalloc. The instance must be explicitly freed.public static LZ4FPreferences create()
LZ4FPreferences instance allocated with BufferUtils.public static LZ4FPreferences create(long address)
LZ4FPreferences instance for the specified memory address.@Nullable public static LZ4FPreferences createSafe(long address)
public static LZ4FPreferences.Buffer malloc(int capacity)
LZ4FPreferences.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static LZ4FPreferences.Buffer calloc(int capacity)
LZ4FPreferences.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static LZ4FPreferences.Buffer create(int capacity)
LZ4FPreferences.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static LZ4FPreferences.Buffer create(long address, int capacity)
LZ4FPreferences.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static LZ4FPreferences.Buffer createSafe(long address, int capacity)
public static LZ4FPreferences mallocStack()
LZ4FPreferences instance allocated on the thread-local MemoryStack.public static LZ4FPreferences callocStack()
LZ4FPreferences instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static LZ4FPreferences mallocStack(org.lwjgl.system.MemoryStack stack)
LZ4FPreferences instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static LZ4FPreferences callocStack(org.lwjgl.system.MemoryStack stack)
LZ4FPreferences instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static LZ4FPreferences.Buffer mallocStack(int capacity)
LZ4FPreferences.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static LZ4FPreferences.Buffer callocStack(int capacity)
LZ4FPreferences.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static LZ4FPreferences.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
LZ4FPreferences.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static LZ4FPreferences.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
LZ4FPreferences.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static LZ4FFrameInfo nframeInfo(long struct)
frameInfo().public static int ncompressionLevel(long struct)
compressionLevel().public static int nautoFlush(long struct)
autoFlush().public static int nfavorDecSpeed(long struct)
favorDecSpeed().public static java.nio.IntBuffer nreserved(long struct)
reserved().public static int nreserved(long struct,
int index)
reserved.public static void nframeInfo(long struct,
LZ4FFrameInfo value)
frameInfo.public static void ncompressionLevel(long struct,
int value)
compressionLevel.public static void nautoFlush(long struct,
int value)
autoFlush.public static void nfavorDecSpeed(long struct,
int value)
favorDecSpeed.public static void nreserved(long struct,
java.nio.IntBuffer value)
reserved.public static void nreserved(long struct,
int index,
int value)
reserved.Copyright LWJGL. All Rights Reserved. License terms.