public class ZstandardCompression extends Object implements org.janelia.saalfeldlab.n5.Compression
org.janelia.saalfeldlab.n5.Compression.CompressionParameter, org.janelia.saalfeldlab.n5.Compression.CompressionType| Modifier and Type | Field and Description |
|---|---|
static int |
ZSTD_CLEVEL_DEFAULT |
| Constructor and Description |
|---|
ZstandardCompression()
Create ZstandardCompression with level equal to the constant ZSTD_CLEVEL_DEFAULT (value: )
Note that this uses a default compression level of 3 matching the C library.
|
ZstandardCompression(int level)
Create ZstandardCompression with the specified compression level.
|
| Modifier and Type | Method and Description |
|---|---|
org.janelia.saalfeldlab.n5.readdata.ReadData |
decode(org.janelia.saalfeldlab.n5.readdata.ReadData readData) |
org.janelia.saalfeldlab.n5.readdata.ReadData |
encode(org.janelia.saalfeldlab.n5.readdata.ReadData readData) |
com.github.luben.zstd.BufferPool |
getBufferPool()
Get how buffers are recycled
|
int |
getChainLog()
Get the size of the multi-probe search table, as a power of 2
Default: 0
|
byte[] |
getDict()
Get the dictionary for compression as a byte array
Default: null (no dictionary)
|
int |
getHashLog()
Set the size of the initial probe table, as a power of 2
Default: 0
|
int |
getJobSize()
Get the size of a compression job.
|
int |
getLevel() |
int |
getMinMatch()
Get the minimum size of searched matches
Default: 0
|
int |
getNbWorkers()
Get the Number of Worker Threads to spawn
Default: 0 (do not spawn any workers)
|
int |
getOverlapLog()
Get the overlap size, as a fraction of window size
Default: 0
|
int |
getSearchLog()
Get the number of search attempts, as a power of 2
Default: 0
|
int |
getStrategy()
See ZSTD_strategy enum definition
Default: 0
|
int |
getTargetLength()
Impact of this field depends on strategy
Default: 0
|
int |
getWindowLog()
Get the maximum allowed back-reference distance, expressed as a power of 2
Default: 0
|
boolean |
isSetCloseFrameOnFlush()
Check if closing the frame on flush is enabled..
|
boolean |
isUseChecksums()
Check if checksums are used for the compressed stream
Default: false
|
void |
setBufferPool(com.github.luben.zstd.BufferPool bufferPool)
Configure how buffers are recycled
|
void |
setChainLog(int chainLog)
Set the size of the multi-probe search table, as a power of 2
Default: 0
|
void |
setDict(byte[] dict)
Set the dictionary for compression as a byte array
Default: null (no dictionary)
|
void |
setHashLog(int hashLog)
Get the size of the initial probe table, as a power of 2
Default: 0
|
void |
setJobSize(int jobSize)
Set the size of a compression job.
|
void |
setLevel(int level)
Set the compression level
The standard compression levels are normally between 1 to 22.
|
void |
setMinMatch(int minMatch)
Set the minimum size of searched matches
Default: 0
|
void |
setNbWorkers(int nbWorkers)
Set the Number of Worker Threads to spawn
Default: 0 (do not spawn any workers)
|
void |
setOverlapLog(int overlapLog)
Set the overlap size, as a fraction of window size
Default: 0
|
void |
setSearchLog(int searchLog)
Set the number of search attempts, as a power of 2
Default: 0
|
void |
setSetCloseFrameOnFlush(boolean setCloseFrameOnFlush)
Enable or disable closing the frame on flush.
|
void |
setStrategy(int strategy)
See ZSTD_strategy enum definition
Default: 0
|
void |
setTargetLength(int targetLength)
Impact of setting this field depends on strategy
Default: 0
|
void |
setUseChecksums(boolean useChecksums)
Enable or disable checksums for the compressed stream
Default: false (disabled)
|
void |
setWindowLog(int windowLog)
Set the maximum allowed back-reference distance, expressed as a power of 2
Default: 0
|
void |
useRecyclingBufferPool(boolean useRecycling)
Configure how buffers are recycled
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, getTypeconcatenate, createpublic static final int ZSTD_CLEVEL_DEFAULT
public ZstandardCompression()
public ZstandardCompression(int level)
level - The standard compression levels are normally between 1 to 22. Negative compression levels offer greater speed.
The default value is .public int getLevel()
public void setLevel(int level)
public int getNbWorkers()
public void setNbWorkers(int nbWorkers)
public int getWindowLog()
public void setWindowLog(int windowLog)
public int getHashLog()
public void setHashLog(int hashLog)
public int getChainLog()
public void setChainLog(int chainLog)
public int getSearchLog()
public void setSearchLog(int searchLog)
public int getMinMatch()
public void setMinMatch(int minMatch)
public int getTargetLength()
public void setTargetLength(int targetLength)
public int getStrategy()
public void setStrategy(int strategy)
public int getJobSize()
nbWorkers >= 1
Default: 0public void setJobSize(int jobSize)
nbWorkers >= 1
Default: 0public int getOverlapLog()
public void setOverlapLog(int overlapLog)
public boolean isUseChecksums()
public void setUseChecksums(boolean useChecksums)
public boolean isSetCloseFrameOnFlush()
public void setSetCloseFrameOnFlush(boolean setCloseFrameOnFlush)
public byte[] getDict()
public void setDict(byte[] dict)
public com.github.luben.zstd.BufferPool getBufferPool()
public void useRecyclingBufferPool(boolean useRecycling)
public void setBufferPool(com.github.luben.zstd.BufferPool bufferPool)
public org.janelia.saalfeldlab.n5.readdata.ReadData decode(org.janelia.saalfeldlab.n5.readdata.ReadData readData)
decode in interface org.janelia.saalfeldlab.n5.codec.DataCodecpublic org.janelia.saalfeldlab.n5.readdata.ReadData encode(org.janelia.saalfeldlab.n5.readdata.ReadData readData)
encode in interface org.janelia.saalfeldlab.n5.codec.DataCodecCopyright © 2023–2026 Janelia Scientific Computing Software. All rights reserved.