Package com.github.luben.zstd
Class ZstdDictCompress
- java.lang.Object
-
- com.github.luben.zstd.AutoCloseBase
-
- com.github.luben.zstd.SharedDictBase
-
- com.github.luben.zstd.ZstdDictCompress
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class ZstdDictCompress extends SharedDictBase
-
-
Constructor Summary
Constructors Constructor Description ZstdDictCompress(byte[] dict, int level)
Convenience constructor to create a new dictionary for use with fast compressZstdDictCompress(byte[] dict, int offset, int length, int level)
Create a new dictionary for use with fast compress
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
doClose()
private void
free()
private void
init(byte[] dict, int dict_offset, int dict_size, int level)
(package private) int
level()
-
Methods inherited from class com.github.luben.zstd.SharedDictBase
finalize
-
Methods inherited from class com.github.luben.zstd.AutoCloseBase
acquireSharedLock, close, releaseSharedLock, storeFence
-
-
-
-
Constructor Detail
-
ZstdDictCompress
public ZstdDictCompress(byte[] dict, int level)
Convenience constructor to create a new dictionary for use with fast compress- Parameters:
dict
- buffer containing dictionary to load/parse with exact lengthlevel
- compression level
-
ZstdDictCompress
public ZstdDictCompress(byte[] dict, int offset, int length, int level)
Create a new dictionary for use with fast compress- Parameters:
dict
- buffer containing dictionaryoffset
- the offset into the buffer to read fromlength
- number of bytes to use from the bufferlevel
- compression level
-
-
Method Detail
-
init
private void init(byte[] dict, int dict_offset, int dict_size, int level)
-
free
private void free()
-
level
int level()
-
doClose
void doClose()
- Specified by:
doClose
in classAutoCloseBase
-
-