Top Description Inners Fields Constructors Methods
org.lwjgl.util.lz4

public Class LZ4FPreferences

extends Struct<LZ4FPreferences>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct LZ4F_preferences_t
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Makes it possible to supply advanced compression instructions to streaming interface. Structure must be first init to 0, using memset(), setting all parameters to default. All reserved fields must be set to zero.

Layout


struct LZ4F_preferences_t {
    LZ4F_frameInfo_t frameInfo;
    int compressionLevel;
    unsigned autoFlush;
    unsigned favorDecSpeed;
    unsigned reserved[3];
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
AUTOFLUSH

The struct member offsets.

public static final int
COMPRESSIONLEVEL

The struct member offsets.

public static final int
FAVORDECSPEED

The struct member offsets.

public static final int
FRAMEINFO

The struct member offsets.

public static final int
RESERVED

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
LZ4FPreferences(long address, ByteBuffer container)

public
LZ4FPreferences(ByteBuffer container)

Creates a LZ4FPreferences instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public boolean
autoFlush()

1: always flush, reduces usage of internal buffers

public LZ4FPreferences
autoFlush(boolean value)

Sets the specified value to the autoFlush field.

public static LZ4FPreferences
calloc()

Returns a new LZ4FPreferences instance allocated with memCalloc.

public static LZ4FPreferences.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new LZ4FPreferences.Buffer instance allocated with memCalloc.

public static LZ4FPreferences
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new LZ4FPreferences instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static LZ4FPreferences.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new LZ4FPreferences.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static LZ4FPreferences
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static LZ4FPreferences
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static LZ4FPreferences.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static LZ4FPreferences.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public int
compressionLevel()

0: default (fast mode); values > CLEVEL_MAX count as CLEVEL_MAX; values > 0 trigger "fast acceleration"

public LZ4FPreferences
compressionLevel(int value)

Sets the specified value to the compressionLevel field.

protected LZ4FPreferences
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static LZ4FPreferences
create()

Returns a new LZ4FPreferences instance allocated with BufferUtils.

public static LZ4FPreferences
create(long address)

Returns a new LZ4FPreferences instance for the specified memory address.

public static LZ4FPreferences.Buffer
create(int
the buffer capacity
capacity
)

Returns a new LZ4FPreferences.Buffer instance allocated with BufferUtils.

public static LZ4FPreferences.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a LZ4FPreferences.Buffer instance at the specified memory.

public static LZ4FPreferences
createSafe(long address)

Like create, but returns null if address is NULL.

public static LZ4FPreferences.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public boolean
favorDecSpeed()

1: parser favors decompression speed vs compression ratio.

public LZ4FPreferences
favorDecSpeed(boolean value)

Sets the specified value to the favorDecSpeed field.

public LZ4FFrameInfo

Returns:

a LZ4FFrameInfo view of the frameInfo field.
frameInfo
()

public LZ4FPreferences
frameInfo(LZ4FFrameInfo value)

Copies the specified LZ4FFrameInfo to the frameInfo field.

public LZ4FPreferences
frameInfo(Consumer<LZ4FFrameInfo> consumer)

Passes the frameInfo field to the specified Consumer.

public static LZ4FPreferences
malloc()

Returns a new LZ4FPreferences instance allocated with memAlloc.

public static LZ4FPreferences.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new LZ4FPreferences.Buffer instance allocated with memAlloc.

public static LZ4FPreferences
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new LZ4FPreferences instance allocated on the specified MemoryStack.

public static LZ4FPreferences.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new LZ4FPreferences.Buffer instance allocated on the specified MemoryStack.

public static LZ4FPreferences
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static LZ4FPreferences
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static LZ4FPreferences.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static LZ4FPreferences.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static int
nautoFlush(long struct)

Unsafe version of autoFlush.

public static void
nautoFlush(long struct, int value)

Unsafe version of autoFlush.

public static int
ncompressionLevel(long struct)

Unsafe version of compressionLevel.

public static void
ncompressionLevel(long struct, int value)

Unsafe version of compressionLevel.

public static int
nfavorDecSpeed(long struct)

Unsafe version of favorDecSpeed.

public static void
nfavorDecSpeed(long struct, int value)

Unsafe version of favorDecSpeed.

public static LZ4FFrameInfo
nframeInfo(long struct)

Unsafe version of frameInfo.

public static void
nframeInfo(long struct, LZ4FFrameInfo value)

Unsafe version of frameInfo.

public static IntBuffer
nreserved(long struct)

Unsafe version of reserved.

public static int
nreserved(long struct, int index)

Unsafe version of reserved.

public static void
nreserved(long struct, IntBuffer value)

Unsafe version of reserved.

public static void
nreserved(long struct, int index, int value)

Unsafe version of reserved.

public IntBuffer
reserved()

must be zero for forward compatibility

public int
reserved(int index)

must be zero for forward compatibility

public LZ4FPreferences
reserved(IntBuffer value)

Copies the specified IntBuffer to the reserved field.

public LZ4FPreferences
reserved(int index, int value)

Sets the specified value at the specified index of the reserved field.

public LZ4FPreferences
set(LZ4FFrameInfo frameInfo, int compressionLevel, boolean autoFlush, boolean favorDecSpeed, IntBuffer reserved)

Initializes this struct with the specified values.

public LZ4FPreferences

Returns:

this struct
set
(LZ4FPreferences
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

AUTOFLUSHback to summary
public static final int AUTOFLUSH

The struct member offsets.

COMPRESSIONLEVELback to summary
public static final int COMPRESSIONLEVEL

The struct member offsets.

FAVORDECSPEEDback to summary
public static final int FAVORDECSPEED

The struct member offsets.

FRAMEINFOback to summary
public static final int FRAMEINFO

The struct member offsets.

RESERVEDback to summary
public static final int RESERVED

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

LZ4FPreferencesback to summary
protected LZ4FPreferences(long address, ByteBuffer container)
LZ4FPreferencesback to summary
public LZ4FPreferences(ByteBuffer container)

Creates a 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.

Method Detail

autoFlushback to summary
public boolean autoFlush()

1: always flush, reduces usage of internal buffers

Annotations
@NativeType:unsigned
autoFlushback to summary
public LZ4FPreferences autoFlush(boolean value)

Sets the specified value to the autoFlush field.

callocback to summary
public static LZ4FPreferences calloc()

Returns a new LZ4FPreferences instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static LZ4FPreferences.Buffer calloc(int capacity)

Returns a new LZ4FPreferences.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static LZ4FPreferences calloc(MemoryStack stack)

Returns a new LZ4FPreferences instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static LZ4FPreferences.Buffer calloc(int capacity, MemoryStack stack)

Returns a new LZ4FPreferences.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

callocStackback to summary
public static LZ4FPreferences callocStack()

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static LZ4FPreferences callocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static LZ4FPreferences.Buffer callocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static LZ4FPreferences.Buffer callocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
compressionLevelback to summary
public int compressionLevel()

0: default (fast mode); values > CLEVEL_MAX count as CLEVEL_MAX; values > 0 trigger "fast acceleration"

compressionLevelback to summary
public LZ4FPreferences compressionLevel(int value)

Sets the specified value to the compressionLevel field.

createback to summary
protected LZ4FPreferences create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static LZ4FPreferences create()

Returns a new LZ4FPreferences instance allocated with BufferUtils.

createback to summary
public static LZ4FPreferences create(long address)

Returns a new LZ4FPreferences instance for the specified memory address.

createback to summary
public static LZ4FPreferences.Buffer create(int capacity)

Returns a new LZ4FPreferences.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static LZ4FPreferences.Buffer create(long address, int capacity)

Create a LZ4FPreferences.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static LZ4FPreferences createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static LZ4FPreferences.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
favorDecSpeedback to summary
public boolean favorDecSpeed()

1: parser favors decompression speed vs compression ratio. Only works for high compression modes (≥ CLEVEL_OPT_MIN). Since version 1.8.2.

Annotations
@NativeType:unsigned
favorDecSpeedback to summary
public LZ4FPreferences favorDecSpeed(boolean value)

Sets the specified value to the favorDecSpeed field.

frameInfoback to summary
public LZ4FFrameInfo frameInfo()
Returns:LZ4FFrameInfo

a LZ4FFrameInfo view of the frameInfo field.

Annotations
@NativeType:LZ4F_frameInfo_t
frameInfoback to summary
public LZ4FPreferences frameInfo(LZ4FFrameInfo value)

Copies the specified LZ4FFrameInfo to the frameInfo field.

frameInfoback to summary
public LZ4FPreferences frameInfo(Consumer<LZ4FFrameInfo> consumer)

Passes the frameInfo field to the specified Consumer.

mallocback to summary
public static LZ4FPreferences malloc()

Returns a new LZ4FPreferences instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static LZ4FPreferences.Buffer malloc(int capacity)

Returns a new LZ4FPreferences.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static LZ4FPreferences malloc(MemoryStack stack)

Returns a new LZ4FPreferences instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static LZ4FPreferences.Buffer malloc(int capacity, MemoryStack stack)

Returns a new LZ4FPreferences.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

mallocStackback to summary
public static LZ4FPreferences mallocStack()

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static LZ4FPreferences mallocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static LZ4FPreferences.Buffer mallocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static LZ4FPreferences.Buffer mallocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
nautoFlushback to summary
public static int nautoFlush(long struct)

Unsafe version of autoFlush.

nautoFlushback to summary
public static void nautoFlush(long struct, int value)

Unsafe version of autoFlush.

ncompressionLevelback to summary
public static int ncompressionLevel(long struct)

Unsafe version of compressionLevel.

ncompressionLevelback to summary
public static void ncompressionLevel(long struct, int value)

Unsafe version of compressionLevel.

nfavorDecSpeedback to summary
public static int nfavorDecSpeed(long struct)

Unsafe version of favorDecSpeed.

nfavorDecSpeedback to summary
public static void nfavorDecSpeed(long struct, int value)

Unsafe version of favorDecSpeed.

nframeInfoback to summary
public static LZ4FFrameInfo nframeInfo(long struct)

Unsafe version of frameInfo.

nframeInfoback to summary
public static void nframeInfo(long struct, LZ4FFrameInfo value)

Unsafe version of frameInfo.

nreservedback to summary
public static IntBuffer nreserved(long struct)

Unsafe version of reserved.

nreservedback to summary
public static int nreserved(long struct, int index)

Unsafe version of reserved.

nreservedback to summary
public static void nreserved(long struct, IntBuffer value)

Unsafe version of reserved.

nreservedback to summary
public static void nreserved(long struct, int index, int value)

Unsafe version of reserved.

reservedback to summary
public IntBuffer reserved()

must be zero for forward compatibility

Annotations
@NativeType:unsigned[3]
reservedback to summary
public int reserved(int index)

must be zero for forward compatibility

Annotations
@NativeType:unsigned
reservedback to summary
public LZ4FPreferences reserved(IntBuffer value)

Copies the specified IntBuffer to the reserved field.

reservedback to summary
public LZ4FPreferences reserved(int index, int value)

Sets the specified value at the specified index of the reserved field.

setback to summary
public LZ4FPreferences set(LZ4FFrameInfo frameInfo, int compressionLevel, boolean autoFlush, boolean favorDecSpeed, IntBuffer reserved)

Initializes this struct with the specified values.

setback to summary
public LZ4FPreferences set(LZ4FPreferences src)

Copies the specified struct data to this struct.

Parameters
src:LZ4FPreferences

the source struct

Returns:LZ4FPreferences

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
org.lwjgl.util.lz4 back to summary

public Class LZ4FPreferences.Buffer

extends StructBuffer<LZ4FPreferences, LZ4FPreferences.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of LZ4FPreferences structs.

Field Summary

Modifier and TypeField and Description
private static final LZ4FPreferences

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new LZ4FPreferences.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

the value of the LZ4FPreferences#autoFlush field.
autoFlush
()

public LZ4FPreferences.Buffer
autoFlush(boolean value)

Sets the specified value to the LZ4FPreferences#autoFlush field.

public int

Returns:

the value of the LZ4FPreferences#compressionLevel field.
compressionLevel
()

public LZ4FPreferences.Buffer
compressionLevel(int value)

Sets the specified value to the LZ4FPreferences#compressionLevel field.

public boolean

Returns:

the value of the LZ4FPreferences#favorDecSpeed field.
favorDecSpeed
()

public LZ4FPreferences.Buffer
favorDecSpeed(boolean value)

Sets the specified value to the LZ4FPreferences#favorDecSpeed field.

public LZ4FFrameInfo

Returns:

a LZ4FFrameInfo view of the frameInfo field.
frameInfo
()

public LZ4FPreferences.Buffer
frameInfo(LZ4FFrameInfo value)

Copies the specified LZ4FFrameInfo to the frameInfo field.

public LZ4FPreferences.Buffer
frameInfo(Consumer<LZ4FFrameInfo> consumer)

Passes the frameInfo field to the specified Consumer.

protected LZ4FPreferences
public IntBuffer

Returns:

a IntBuffer view of the LZ4FPreferences#reserved field.
reserved
()

public int

Returns:

the value at the specified index of the LZ4FPreferences#reserved field.
reserved
(int index)

public LZ4FPreferences.Buffer
reserved(IntBuffer value)

Copies the specified IntBuffer to the LZ4FPreferences#reserved field.

public LZ4FPreferences.Buffer
reserved(int index, int value)

Sets the specified value at the specified index of the LZ4FPreferences#reserved field.

protected LZ4FPreferences.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final LZ4FPreferences ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new LZ4FPreferences.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by LZ4FPreferences#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

autoFlushback to summary
public boolean autoFlush()
Returns:boolean

the value of the LZ4FPreferences#autoFlush field.

Annotations
@NativeType:unsigned
autoFlushback to summary
public LZ4FPreferences.Buffer autoFlush(boolean value)

Sets the specified value to the LZ4FPreferences#autoFlush field.

compressionLevelback to summary
public int compressionLevel()
Returns:int

the value of the LZ4FPreferences#compressionLevel field.

compressionLevelback to summary
public LZ4FPreferences.Buffer compressionLevel(int value)

Sets the specified value to the LZ4FPreferences#compressionLevel field.

favorDecSpeedback to summary
public boolean favorDecSpeed()
Returns:boolean

the value of the LZ4FPreferences#favorDecSpeed field.

Annotations
@NativeType:unsigned
favorDecSpeedback to summary
public LZ4FPreferences.Buffer favorDecSpeed(boolean value)

Sets the specified value to the LZ4FPreferences#favorDecSpeed field.

frameInfoback to summary
public LZ4FFrameInfo frameInfo()
Returns:LZ4FFrameInfo

a LZ4FFrameInfo view of the frameInfo field.

Annotations
@NativeType:LZ4F_frameInfo_t
frameInfoback to summary
public LZ4FPreferences.Buffer frameInfo(LZ4FFrameInfo value)

Copies the specified LZ4FFrameInfo to the frameInfo field.

frameInfoback to summary
public LZ4FPreferences.Buffer frameInfo(Consumer<LZ4FFrameInfo> consumer)

Passes the frameInfo field to the specified Consumer.

getElementFactoryback to summary
protected LZ4FPreferences getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
reservedback to summary
public IntBuffer reserved()
Returns:IntBuffer

a IntBuffer view of the LZ4FPreferences#reserved field.

Annotations
@NativeType:unsigned[3]
reservedback to summary
public int reserved(int index)
Returns:int

the value at the specified index of the LZ4FPreferences#reserved field.

Annotations
@NativeType:unsigned
reservedback to summary
public LZ4FPreferences.Buffer reserved(IntBuffer value)

Copies the specified IntBuffer to the LZ4FPreferences#reserved field.

reservedback to summary
public LZ4FPreferences.Buffer reserved(int index, int value)

Sets the specified value at the specified index of the LZ4FPreferences#reserved field.

selfback to summary
protected LZ4FPreferences.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override