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.NativeResourceMakes 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.Layout
struct LZ4F_frameInfo_t { LZ4F_blockSizeID_tblockSizeID(); LZ4F_blockMode_tblockMode(); LZ4F_contentChecksum_tcontentChecksumFlag(); LZ4F_frameType_tframeType(); unsigned long longcontentSize(); unsigneddictID(); LZ4F_blockChecksum_tblockChecksumFlag(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLZ4FFrameInfo.BufferAn array ofLZ4FFrameInfostructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intBLOCKCHECKSUMFLAG
BLOCKMODE
BLOCKSIZEID
CONTENTCHECKSUMFLAG
CONTENTSIZE
DICTID
FRAMETYPEThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description LZ4FFrameInfo(java.nio.ByteBuffer container)Creates aLZ4FFrameInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intblockChecksumFlag()1: each block followed by a checksum of block's compressed data; 0: disabled (default)LZ4FFrameInfoblockChecksumFlag(int value)Sets the specified value to theblockChecksumFlag()field.intblockMode()0 == default.LZ4FFrameInfoblockMode(int value)Sets the specified value to theblockMode()field.intblockSizeID()0 == default.LZ4FFrameInfoblockSizeID(int value)Sets the specified value to theblockSizeID()field.static LZ4FFrameInfocalloc()Returns a newLZ4FFrameInfoinstance allocated withmemCalloc.static LZ4FFrameInfo.Buffercalloc(int capacity)Returns a newLZ4FFrameInfo.Bufferinstance allocated withmemCalloc.static LZ4FFrameInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newLZ4FFrameInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static LZ4FFrameInfocalloc(org.lwjgl.system.MemoryStack stack)Returns a newLZ4FFrameInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static LZ4FFrameInfocallocStack()Deprecated.static LZ4FFrameInfo.BuffercallocStack(int capacity)Deprecated.static LZ4FFrameInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static LZ4FFrameInfocallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.intcontentChecksumFlag()1: frame terminated with 32-bit checksum of decompressed data; 0: disabled (default)LZ4FFrameInfocontentChecksumFlag(int value)Sets the specified value to thecontentChecksumFlag()field.longcontentSize()size of uncompressed content ;0 == unknownLZ4FFrameInfocontentSize(long value)Sets the specified value to thecontentSize()field.static LZ4FFrameInfocreate()Returns a newLZ4FFrameInfoinstance allocated withBufferUtils.static LZ4FFrameInfo.Buffercreate(int capacity)Returns a newLZ4FFrameInfo.Bufferinstance allocated withBufferUtils.static LZ4FFrameInfocreate(long address)Returns a newLZ4FFrameInfoinstance for the specified memory address.static LZ4FFrameInfo.Buffercreate(long address, int capacity)Create aLZ4FFrameInfo.Bufferinstance at the specified memory.static LZ4FFrameInfocreateSafe(long address)static LZ4FFrameInfo.BuffercreateSafe(long address, int capacity)intdictID()dictionary ID, sent by compressor to help decoder select correct dictionary; 0 == nodictIDprovidedLZ4FFrameInfodictID(int value)Sets the specified value to thedictID()field.intframeType()read-only field.LZ4FFrameInfoframeType(int value)Sets the specified value to theframeType()field.static LZ4FFrameInfomalloc()Returns a newLZ4FFrameInfoinstance allocated withmemAlloc.static LZ4FFrameInfo.Buffermalloc(int capacity)Returns a newLZ4FFrameInfo.Bufferinstance allocated withmemAlloc.static LZ4FFrameInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newLZ4FFrameInfo.Bufferinstance allocated on the specifiedMemoryStack.static LZ4FFrameInfomalloc(org.lwjgl.system.MemoryStack stack)Returns a newLZ4FFrameInfoinstance allocated on the specifiedMemoryStack.static LZ4FFrameInfomallocStack()Deprecated.static LZ4FFrameInfo.BuffermallocStack(int capacity)Deprecated.static LZ4FFrameInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static LZ4FFrameInfomallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static intnblockChecksumFlag(long struct)Unsafe version ofblockChecksumFlag().static voidnblockChecksumFlag(long struct, int value)Unsafe version ofblockChecksumFlag.static intnblockMode(long struct)Unsafe version ofblockMode().static voidnblockMode(long struct, int value)Unsafe version ofblockMode.static intnblockSizeID(long struct)Unsafe version ofblockSizeID().static voidnblockSizeID(long struct, int value)Unsafe version ofblockSizeID.static intncontentChecksumFlag(long struct)Unsafe version ofcontentChecksumFlag().static voidncontentChecksumFlag(long struct, int value)Unsafe version ofcontentChecksumFlag.static longncontentSize(long struct)Unsafe version ofcontentSize().static voidncontentSize(long struct, long value)Unsafe version ofcontentSize.static intndictID(long struct)Unsafe version ofdictID().static voidndictID(long struct, int value)Unsafe version ofdictID.static intnframeType(long struct)Unsafe version offrameType().static voidnframeType(long struct, int value)Unsafe version offrameType.LZ4FFrameInfoset(int blockSizeID, int blockMode, int contentChecksumFlag, int frameType, long contentSize, int dictID, int blockChecksumFlag)Initializes this struct with the specified values.LZ4FFrameInfoset(LZ4FFrameInfo src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
LZ4FFrameInfo
public LZ4FFrameInfo(java.nio.ByteBuffer container)
Creates aLZ4FFrameInfoinstance 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
-
blockSizeID
public int blockSizeID()
-
blockMode
public int blockMode()
-
contentChecksumFlag
public int contentChecksumFlag()
1: frame terminated with 32-bit checksum of decompressed data; 0: disabled (default)
-
frameType
public int frameType()
read-only field. One of:frameskippableFrame
-
contentSize
public long contentSize()
size of uncompressed content ;0 == unknown
-
dictID
public int dictID()
dictionary ID, sent by compressor to help decoder select correct dictionary; 0 == nodictIDprovided
-
blockChecksumFlag
public int blockChecksumFlag()
1: each block followed by a checksum of block's compressed data; 0: disabled (default)
-
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 newLZ4FFrameInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static LZ4FFrameInfo calloc()
Returns a newLZ4FFrameInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static LZ4FFrameInfo create()
Returns a newLZ4FFrameInfoinstance allocated withBufferUtils.
-
create
public static LZ4FFrameInfo create(long address)
Returns a newLZ4FFrameInfoinstance for the specified memory address.
-
createSafe
@Nullable public static LZ4FFrameInfo createSafe(long address)
-
malloc
public static LZ4FFrameInfo.Buffer malloc(int capacity)
Returns a newLZ4FFrameInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static LZ4FFrameInfo.Buffer calloc(int capacity)
Returns a newLZ4FFrameInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static LZ4FFrameInfo.Buffer create(int capacity)
Returns a newLZ4FFrameInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static LZ4FFrameInfo.Buffer create(long address, int capacity)
Create aLZ4FFrameInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static LZ4FFrameInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static LZ4FFrameInfo mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static LZ4FFrameInfo callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static LZ4FFrameInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static LZ4FFrameInfo callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static LZ4FFrameInfo.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static LZ4FFrameInfo.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static LZ4FFrameInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static LZ4FFrameInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static LZ4FFrameInfo malloc(org.lwjgl.system.MemoryStack stack)
Returns a newLZ4FFrameInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static LZ4FFrameInfo calloc(org.lwjgl.system.MemoryStack stack)
Returns a newLZ4FFrameInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static LZ4FFrameInfo.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newLZ4FFrameInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static LZ4FFrameInfo.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newLZ4FFrameInfo.Bufferinstance allocated on the specifiedMemoryStackand 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.
-
-