Top Fields Constructors Methods
com.github.luben.zstd

public Class ZstdDictCompress

extends SharedDictBase
Class Inheritance
Imports
java.nio.ByteBuffer, com.github.luben.zstd.util.Native

Field Summary

Modifier and TypeField and Description
private int
private long

Constructor Summary

AccessConstructor and Description
public
ZstdDictCompress(byte[]
buffer containing dictionary to load/parse with exact length
dict
,
int
compression level
level
)

Convenience constructor to create a new dictionary for use with fast compress

public
ZstdDictCompress(byte[]
buffer containing dictionary
dict
,
int
the offset into the buffer to read from
offset
,
int
number of bytes to use from the buffer
length
,
int
compression level
level
)

Create a new dictionary for use with fast compress

public
ZstdDictCompress(ByteBuffer
Direct ByteBuffer containing dictionary using position and limit to define range in buffer.
dict
,
int
compression level
level
)

Create a new dictionary for use with fast compress.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
private native void
free()

private native void
init(byte[] dict, int dict_offset, int dict_size, int level)

private native void
initDirect(ByteBuffer dict, int dict_offset, int dict_size, int level)

pack-priv int
Inherited from com.github.luben.zstd.SharedDictBase:
finalize

Field Detail

levelback to summary
private int level
nativePtrback to summary
private long nativePtr

Constructor Detail

ZstdDictCompressback to summary
public ZstdDictCompress(byte[] dict, int level)

Convenience constructor to create a new dictionary for use with fast compress

Parameters
dict:byte[]

buffer containing dictionary to load/parse with exact length

level:int

compression level

ZstdDictCompressback to summary
public ZstdDictCompress(byte[] dict, int offset, int length, int level)

Create a new dictionary for use with fast compress

Parameters
dict:byte[]

buffer containing dictionary

offset:int

the offset into the buffer to read from

length:int

number of bytes to use from the buffer

level:int

compression level

ZstdDictCompressback to summary
public ZstdDictCompress(ByteBuffer dict, int level)

Create a new dictionary for use with fast compress. The provided bytebuffer is available for reuse when the method returns.

Parameters
dict:ByteBuffer

Direct ByteBuffer containing dictionary using position and limit to define range in buffer.

level:int

compression level

Method Detail

doCloseback to summary
pack-priv void doClose()

Implements abstract com.github.luben.zstd.AutoCloseBase.doClose.

Annotations
@Override
freeback to summary
private native void free()
initback to summary
private native void init(byte[] dict, int dict_offset, int dict_size, int level)
initDirectback to summary
private native void initDirect(ByteBuffer dict, int dict_offset, int dict_size, int level)
levelback to summary
pack-priv int level()