Package org.lwjgl.util.lz4
Class LZ4FFrameInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.lz4.LZ4FFrameInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class LZ4FFrameInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Makes it possible to set or read frame parameters.Structure must be first init to 0, using
memset()
, setting all parameters to default. It's then possible to update selectively some parameter.Member documentation
blockSizeID
–0 == default
. One of:max64KB
max256KB
max1MB
max4MB
blockMode
–0 == default
. One of:blockLinked
blockIndependent
blockChecksumEnabled
contentChecksumFlag
– 1: frame terminated with 32-bit checksum of decompressed data; 0: disabled (default)frameType
– read-only field. One of:frame
skippableFrame
contentSize
– size of uncompressed content ;0 == unknown
dictID
– dictionary ID, sent by compressor to help decoder select correct dictionary; 0 == nodictID
providedblockChecksumFlag
– 1: each block followed by a checksum of block's compressed data; 0: disabled (default)
Layout
struct LZ4F_frameInfo_t { LZ4F_blockSizeID_t blockSizeID; LZ4F_blockMode_t blockMode; LZ4F_contentChecksum_t contentChecksumFlag; LZ4F_frameType_t frameType; unsigned long long contentSize; unsigned dictID; LZ4F_blockChecksum_t blockChecksumFlag; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LZ4FFrameInfo.Buffer
An array ofLZ4FFrameInfo
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
BLOCKCHECKSUMFLAG
BLOCKMODE
BLOCKSIZEID
CONTENTCHECKSUMFLAG
CONTENTSIZE
DICTID
FRAMETYPEThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description LZ4FFrameInfo(java.nio.ByteBuffer container)
Creates aLZ4FFrameInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
blockChecksumFlag()
Returns the value of theblockChecksumFlag
field.LZ4FFrameInfo
blockChecksumFlag(int value)
Sets the specified value to theblockChecksumFlag
field.int
blockMode()
Returns the value of theblockMode
field.LZ4FFrameInfo
blockMode(int value)
Sets the specified value to theblockMode
field.int
blockSizeID()
Returns the value of theblockSizeID
field.LZ4FFrameInfo
blockSizeID(int value)
Sets the specified value to theblockSizeID
field.static LZ4FFrameInfo
calloc()
Returns a newLZ4FFrameInfo
instance allocated withmemCalloc
.static LZ4FFrameInfo.Buffer
calloc(int capacity)
Returns a newLZ4FFrameInfo.Buffer
instance allocated withmemCalloc
.static LZ4FFrameInfo
callocStack()
Returns a newLZ4FFrameInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static LZ4FFrameInfo.Buffer
callocStack(int capacity)
Returns a newLZ4FFrameInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static LZ4FFrameInfo.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newLZ4FFrameInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static LZ4FFrameInfo
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newLZ4FFrameInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
contentChecksumFlag()
Returns the value of thecontentChecksumFlag
field.LZ4FFrameInfo
contentChecksumFlag(int value)
Sets the specified value to thecontentChecksumFlag
field.long
contentSize()
Returns the value of thecontentSize
field.LZ4FFrameInfo
contentSize(long value)
Sets the specified value to thecontentSize
field.static LZ4FFrameInfo
create()
Returns a newLZ4FFrameInfo
instance allocated withBufferUtils
.static LZ4FFrameInfo.Buffer
create(int capacity)
Returns a newLZ4FFrameInfo.Buffer
instance allocated withBufferUtils
.static LZ4FFrameInfo
create(long address)
Returns a newLZ4FFrameInfo
instance for the specified memory address.static LZ4FFrameInfo.Buffer
create(long address, int capacity)
Create aLZ4FFrameInfo.Buffer
instance at the specified memory.static LZ4FFrameInfo
createSafe(long address)
static LZ4FFrameInfo.Buffer
createSafe(long address, int capacity)
int
dictID()
Returns the value of thedictID
field.LZ4FFrameInfo
dictID(int value)
Sets the specified value to thedictID
field.int
frameType()
Returns the value of theframeType
field.LZ4FFrameInfo
frameType(int value)
Sets the specified value to theframeType
field.static LZ4FFrameInfo
malloc()
Returns a newLZ4FFrameInfo
instance allocated withmemAlloc
.static LZ4FFrameInfo.Buffer
malloc(int capacity)
Returns a newLZ4FFrameInfo.Buffer
instance allocated withmemAlloc
.static LZ4FFrameInfo
mallocStack()
Returns a newLZ4FFrameInfo
instance allocated on the thread-localMemoryStack
.static LZ4FFrameInfo.Buffer
mallocStack(int capacity)
Returns a newLZ4FFrameInfo.Buffer
instance allocated on the thread-localMemoryStack
.static LZ4FFrameInfo.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newLZ4FFrameInfo.Buffer
instance allocated on the specifiedMemoryStack
.static LZ4FFrameInfo
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newLZ4FFrameInfo
instance allocated on the specifiedMemoryStack
.static int
nblockChecksumFlag(long struct)
Unsafe version ofblockChecksumFlag()
.static void
nblockChecksumFlag(long struct, int value)
Unsafe version ofblockChecksumFlag
.static int
nblockMode(long struct)
Unsafe version ofblockMode()
.static void
nblockMode(long struct, int value)
Unsafe version ofblockMode
.static int
nblockSizeID(long struct)
Unsafe version ofblockSizeID()
.static void
nblockSizeID(long struct, int value)
Unsafe version ofblockSizeID
.static int
ncontentChecksumFlag(long struct)
Unsafe version ofcontentChecksumFlag()
.static void
ncontentChecksumFlag(long struct, int value)
Unsafe version ofcontentChecksumFlag
.static long
ncontentSize(long struct)
Unsafe version ofcontentSize()
.static void
ncontentSize(long struct, long value)
Unsafe version ofcontentSize
.static int
ndictID(long struct)
Unsafe version ofdictID()
.static void
ndictID(long struct, int value)
Unsafe version ofdictID
.static int
nframeType(long struct)
Unsafe version offrameType()
.static void
nframeType(long struct, int value)
Unsafe version offrameType
.LZ4FFrameInfo
set(int blockSizeID, int blockMode, int contentChecksumFlag, int frameType, long contentSize, int dictID, int blockChecksumFlag)
Initializes this struct with the specified values.LZ4FFrameInfo
set(LZ4FFrameInfo src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
LZ4FFrameInfo
public LZ4FFrameInfo(java.nio.ByteBuffer container)
Creates aLZ4FFrameInfo
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
-
blockSizeID
public int blockSizeID()
Returns the value of theblockSizeID
field.
-
blockMode
public int blockMode()
Returns the value of theblockMode
field.
-
contentChecksumFlag
public int contentChecksumFlag()
Returns the value of thecontentChecksumFlag
field.
-
frameType
public int frameType()
Returns the value of theframeType
field.
-
contentSize
public long contentSize()
Returns the value of thecontentSize
field.
-
dictID
public int dictID()
Returns the value of thedictID
field.
-
blockChecksumFlag
public int blockChecksumFlag()
Returns the value of theblockChecksumFlag
field.
-
blockSizeID
public LZ4FFrameInfo blockSizeID(int value)
Sets the specified value to theblockSizeID
field.
-
blockMode
public LZ4FFrameInfo blockMode(int value)
Sets the specified value to theblockMode
field.
-
contentChecksumFlag
public LZ4FFrameInfo contentChecksumFlag(int value)
Sets the specified value to thecontentChecksumFlag
field.
-
frameType
public LZ4FFrameInfo frameType(int value)
Sets the specified value to theframeType
field.
-
contentSize
public LZ4FFrameInfo contentSize(long value)
Sets the specified value to thecontentSize
field.
-
dictID
public LZ4FFrameInfo dictID(int value)
Sets the specified value to thedictID
field.
-
blockChecksumFlag
public LZ4FFrameInfo blockChecksumFlag(int value)
Sets the specified value to theblockChecksumFlag
field.
-
set
public LZ4FFrameInfo set(int blockSizeID, int blockMode, int contentChecksumFlag, int frameType, long contentSize, int dictID, int blockChecksumFlag)
Initializes this struct with the specified values.
-
set
public LZ4FFrameInfo set(LZ4FFrameInfo src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static LZ4FFrameInfo malloc()
Returns a newLZ4FFrameInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static LZ4FFrameInfo calloc()
Returns a newLZ4FFrameInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static LZ4FFrameInfo create()
Returns a newLZ4FFrameInfo
instance allocated withBufferUtils
.
-
create
public static LZ4FFrameInfo create(long address)
Returns a newLZ4FFrameInfo
instance for the specified memory address.
-
createSafe
@Nullable public static LZ4FFrameInfo createSafe(long address)
-
malloc
public static LZ4FFrameInfo.Buffer malloc(int capacity)
Returns a newLZ4FFrameInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static LZ4FFrameInfo.Buffer calloc(int capacity)
Returns a newLZ4FFrameInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static LZ4FFrameInfo.Buffer create(int capacity)
Returns a newLZ4FFrameInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static LZ4FFrameInfo.Buffer create(long address, int capacity)
Create aLZ4FFrameInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static LZ4FFrameInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
public static LZ4FFrameInfo mallocStack()
Returns a newLZ4FFrameInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static LZ4FFrameInfo callocStack()
Returns a newLZ4FFrameInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static LZ4FFrameInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newLZ4FFrameInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static LZ4FFrameInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newLZ4FFrameInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static LZ4FFrameInfo.Buffer mallocStack(int capacity)
Returns a newLZ4FFrameInfo.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static LZ4FFrameInfo.Buffer callocStack(int capacity)
Returns a newLZ4FFrameInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static LZ4FFrameInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newLZ4FFrameInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static LZ4FFrameInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newLZ4FFrameInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nblockSizeID
public static int nblockSizeID(long struct)
Unsafe version ofblockSizeID()
.
-
nblockMode
public static int nblockMode(long struct)
Unsafe version ofblockMode()
.
-
ncontentChecksumFlag
public static int ncontentChecksumFlag(long struct)
Unsafe version ofcontentChecksumFlag()
.
-
nframeType
public static int nframeType(long struct)
Unsafe version offrameType()
.
-
ncontentSize
public static long ncontentSize(long struct)
Unsafe version ofcontentSize()
.
-
ndictID
public static int ndictID(long struct)
Unsafe version ofdictID()
.
-
nblockChecksumFlag
public static int nblockChecksumFlag(long struct)
Unsafe version ofblockChecksumFlag()
.
-
nblockSizeID
public static void nblockSizeID(long struct, int value)
Unsafe version ofblockSizeID
.
-
nblockMode
public static void nblockMode(long struct, int value)
Unsafe version ofblockMode
.
-
ncontentChecksumFlag
public static void ncontentChecksumFlag(long struct, int value)
Unsafe version ofcontentChecksumFlag
.
-
nframeType
public static void nframeType(long struct, int value)
Unsafe version offrameType
.
-
ncontentSize
public static void ncontentSize(long struct, long value)
Unsafe version ofcontentSize
.
-
ndictID
public static void ndictID(long struct, int value)
Unsafe version ofdictID
.
-
nblockChecksumFlag
public static void nblockChecksumFlag(long struct, int value)
Unsafe version ofblockChecksumFlag
.
-
-