Package org.lwjgl.util.zstd
Class ZSTDCompressionParameters
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.zstd.ZSTDCompressionParameters
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class ZSTDCompressionParameters extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Member documentation
windowLog
– largest match distance: larger == more compression, more memory needed during decompressionchainLog
– fully searched segment: larger == more compression, slower, more memory (useless for fast)hashLog
– dispatch table: larger == faster, more memorysearchLog
– nb of searches: larger == more compression, slowerminMatch
– match length searched: larger == faster decompression, sometimes less compressiontargetLength
– acceptable match size for optimal parser (only): larger == more compression, slowerstrategy
– seeZSTD_strategy
definition
Layout
struct ZSTD_compressionParameters { unsigned int windowLog; unsigned int chainLog; unsigned int hashLog; unsigned int searchLog; unsigned int minMatch; unsigned int targetLength; ZSTD_strategy strategy; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ZSTDCompressionParameters.Buffer
An array ofZSTDCompressionParameters
structs.
-
Constructor Summary
Constructors Constructor Description ZSTDCompressionParameters(java.nio.ByteBuffer container)
Creates aZSTDCompressionParameters
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 ZSTDCompressionParameters
calloc()
Returns a newZSTDCompressionParameters
instance allocated withmemCalloc
.static ZSTDCompressionParameters.Buffer
calloc(int capacity)
Returns a newZSTDCompressionParameters.Buffer
instance allocated withmemCalloc
.static ZSTDCompressionParameters
callocStack()
Returns a newZSTDCompressionParameters
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ZSTDCompressionParameters.Buffer
callocStack(int capacity)
Returns a newZSTDCompressionParameters.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static ZSTDCompressionParameters.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZSTDCompressionParameters.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static ZSTDCompressionParameters
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZSTDCompressionParameters
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
chainLog()
Returns the value of thechainLog
field.ZSTDCompressionParameters
chainLog(int value)
Sets the specified value to thechainLog
field.static ZSTDCompressionParameters
create()
Returns a newZSTDCompressionParameters
instance allocated withBufferUtils
.static ZSTDCompressionParameters.Buffer
create(int capacity)
Returns a newZSTDCompressionParameters.Buffer
instance allocated withBufferUtils
.static ZSTDCompressionParameters
create(long address)
Returns a newZSTDCompressionParameters
instance for the specified memory address.static ZSTDCompressionParameters.Buffer
create(long address, int capacity)
Create aZSTDCompressionParameters.Buffer
instance at the specified memory.static ZSTDCompressionParameters
createSafe(long address)
static ZSTDCompressionParameters.Buffer
createSafe(long address, int capacity)
int
hashLog()
Returns the value of thehashLog
field.ZSTDCompressionParameters
hashLog(int value)
Sets the specified value to thehashLog
field.static ZSTDCompressionParameters
malloc()
Returns a newZSTDCompressionParameters
instance allocated withmemAlloc
.static ZSTDCompressionParameters.Buffer
malloc(int capacity)
Returns a newZSTDCompressionParameters.Buffer
instance allocated withmemAlloc
.static ZSTDCompressionParameters
mallocStack()
Returns a newZSTDCompressionParameters
instance allocated on the thread-localMemoryStack
.static ZSTDCompressionParameters.Buffer
mallocStack(int capacity)
Returns a newZSTDCompressionParameters.Buffer
instance allocated on the thread-localMemoryStack
.static ZSTDCompressionParameters.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZSTDCompressionParameters.Buffer
instance allocated on the specifiedMemoryStack
.static ZSTDCompressionParameters
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZSTDCompressionParameters
instance allocated on the specifiedMemoryStack
.int
minMatch()
Returns the value of theminMatch
field.ZSTDCompressionParameters
minMatch(int value)
Sets the specified value to theminMatch
field.static int
nchainLog(long struct)
Unsafe version ofchainLog()
.static void
nchainLog(long struct, int value)
Unsafe version ofchainLog
.static int
nhashLog(long struct)
Unsafe version ofhashLog()
.static void
nhashLog(long struct, int value)
Unsafe version ofhashLog
.static int
nminMatch(long struct)
Unsafe version ofminMatch()
.static void
nminMatch(long struct, int value)
Unsafe version ofminMatch
.static int
nsearchLog(long struct)
Unsafe version ofsearchLog()
.static void
nsearchLog(long struct, int value)
Unsafe version ofsearchLog
.static int
nstrategy(long struct)
Unsafe version ofstrategy()
.static void
nstrategy(long struct, int value)
Unsafe version ofstrategy
.static int
ntargetLength(long struct)
Unsafe version oftargetLength()
.static void
ntargetLength(long struct, int value)
Unsafe version oftargetLength
.static int
nwindowLog(long struct)
Unsafe version ofwindowLog()
.static void
nwindowLog(long struct, int value)
Unsafe version ofwindowLog
.int
searchLog()
Returns the value of thesearchLog
field.ZSTDCompressionParameters
searchLog(int value)
Sets the specified value to thesearchLog
field.ZSTDCompressionParameters
set(int windowLog, int chainLog, int hashLog, int searchLog, int minMatch, int targetLength, int strategy)
Initializes this struct with the specified values.ZSTDCompressionParameters
set(ZSTDCompressionParameters src)
Copies the specified struct data to this struct.int
sizeof()
int
strategy()
Returns the value of thestrategy
field.ZSTDCompressionParameters
strategy(int value)
Sets the specified value to thestrategy
field.int
targetLength()
Returns the value of thetargetLength
field.ZSTDCompressionParameters
targetLength(int value)
Sets the specified value to thetargetLength
field.int
windowLog()
Returns the value of thewindowLog
field.ZSTDCompressionParameters
windowLog(int value)
Sets the specified value to thewindowLog
field.
-
-
-
Constructor Detail
-
ZSTDCompressionParameters
public ZSTDCompressionParameters(java.nio.ByteBuffer container)
Creates aZSTDCompressionParameters
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()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
windowLog
public int windowLog()
Returns the value of thewindowLog
field.
-
chainLog
public int chainLog()
Returns the value of thechainLog
field.
-
hashLog
public int hashLog()
Returns the value of thehashLog
field.
-
searchLog
public int searchLog()
Returns the value of thesearchLog
field.
-
minMatch
public int minMatch()
Returns the value of theminMatch
field.
-
targetLength
public int targetLength()
Returns the value of thetargetLength
field.
-
strategy
public int strategy()
Returns the value of thestrategy
field.
-
windowLog
public ZSTDCompressionParameters windowLog(int value)
Sets the specified value to thewindowLog
field.
-
chainLog
public ZSTDCompressionParameters chainLog(int value)
Sets the specified value to thechainLog
field.
-
hashLog
public ZSTDCompressionParameters hashLog(int value)
Sets the specified value to thehashLog
field.
-
searchLog
public ZSTDCompressionParameters searchLog(int value)
Sets the specified value to thesearchLog
field.
-
minMatch
public ZSTDCompressionParameters minMatch(int value)
Sets the specified value to theminMatch
field.
-
targetLength
public ZSTDCompressionParameters targetLength(int value)
Sets the specified value to thetargetLength
field.
-
strategy
public ZSTDCompressionParameters strategy(int value)
Sets the specified value to thestrategy
field.
-
set
public ZSTDCompressionParameters set(int windowLog, int chainLog, int hashLog, int searchLog, int minMatch, int targetLength, int strategy)
Initializes this struct with the specified values.
-
set
public ZSTDCompressionParameters set(ZSTDCompressionParameters src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static ZSTDCompressionParameters malloc()
Returns a newZSTDCompressionParameters
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static ZSTDCompressionParameters calloc()
Returns a newZSTDCompressionParameters
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static ZSTDCompressionParameters create()
Returns a newZSTDCompressionParameters
instance allocated withBufferUtils
.
-
create
public static ZSTDCompressionParameters create(long address)
Returns a newZSTDCompressionParameters
instance for the specified memory address.
-
createSafe
@Nullable public static ZSTDCompressionParameters createSafe(long address)
-
malloc
public static ZSTDCompressionParameters.Buffer malloc(int capacity)
Returns a newZSTDCompressionParameters.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static ZSTDCompressionParameters.Buffer calloc(int capacity)
Returns a newZSTDCompressionParameters.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static ZSTDCompressionParameters.Buffer create(int capacity)
Returns a newZSTDCompressionParameters.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static ZSTDCompressionParameters.Buffer create(long address, int capacity)
Create aZSTDCompressionParameters.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static ZSTDCompressionParameters.Buffer createSafe(long address, int capacity)
-
mallocStack
public static ZSTDCompressionParameters mallocStack()
Returns a newZSTDCompressionParameters
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static ZSTDCompressionParameters callocStack()
Returns a newZSTDCompressionParameters
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static ZSTDCompressionParameters mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZSTDCompressionParameters
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static ZSTDCompressionParameters callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newZSTDCompressionParameters
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static ZSTDCompressionParameters.Buffer mallocStack(int capacity)
Returns a newZSTDCompressionParameters.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static ZSTDCompressionParameters.Buffer callocStack(int capacity)
Returns a newZSTDCompressionParameters.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static ZSTDCompressionParameters.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZSTDCompressionParameters.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static ZSTDCompressionParameters.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newZSTDCompressionParameters.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nwindowLog
public static int nwindowLog(long struct)
Unsafe version ofwindowLog()
.
-
nchainLog
public static int nchainLog(long struct)
Unsafe version ofchainLog()
.
-
nhashLog
public static int nhashLog(long struct)
Unsafe version ofhashLog()
.
-
nsearchLog
public static int nsearchLog(long struct)
Unsafe version ofsearchLog()
.
-
nminMatch
public static int nminMatch(long struct)
Unsafe version ofminMatch()
.
-
ntargetLength
public static int ntargetLength(long struct)
Unsafe version oftargetLength()
.
-
nstrategy
public static int nstrategy(long struct)
Unsafe version ofstrategy()
.
-
nwindowLog
public static void nwindowLog(long struct, int value)
Unsafe version ofwindowLog
.
-
nchainLog
public static void nchainLog(long struct, int value)
Unsafe version ofchainLog
.
-
nhashLog
public static void nhashLog(long struct, int value)
Unsafe version ofhashLog
.
-
nsearchLog
public static void nsearchLog(long struct, int value)
Unsafe version ofsearchLog
.
-
nminMatch
public static void nminMatch(long struct, int value)
Unsafe version ofminMatch
.
-
ntargetLength
public static void ntargetLength(long struct, int value)
Unsafe version oftargetLength
.
-
nstrategy
public static void nstrategy(long struct, int value)
Unsafe version ofstrategy
.
-
-