public final class HDF5FloatStorageFeatures
extends java.lang.Object
The ..._KEEP
variants denote that the specified storage features should only be
applied if a new data set has to be created. If the data set already exists, it will be kept with
whatever storage features it has.
Note that this may lead to an exception if the existing data set is non-extendable and the
dimensions of the new data set differ from the dimensions of the existing data set.
The ..._DELETE
variants denote that the specified storage features should always be
applied. If the data set already exists, it will be deleted before the new data set is written.
This is the default behavior. However, if the
IHDF5WriterConfigurator.keepDataSetsIfTheyExist()
setting is given, the
..._DELETE
variant can be used to override this setting on a case-by-case basis.
The available storage layouts are HDF5StorageLayout.COMPACT
,
HDF5StorageLayout.CONTIGUOUS
or HDF5StorageLayout.CHUNKED
can be chosen. Only
HDF5StorageLayout.CHUNKED
is extendable and can be compressed.
Two types of compressions are supported: deflation (the method used by gzip
)
and scaling, which can be used if the accuracy of the values are smaller than what the
atomic data type can store. Note that scaling in general is a lossy compression
while deflation is always lossless. Scaling compression is only available with HDF5
1.8 and newer. Trying to use scaling in strict HDF5 1.6 compatibility mode will throw an
IllegalStateException
.
For deflation the deflation level can be chosen to get the right balance between speed of
compression and compression ratio. Often the DEFAULT_DEFLATION_LEVEL
will be the right
choice.
For scaling, the scaling factor can be chosen that determines the accuracy of the values
saved. For float values, the scaling factor determines the number of significant digits of the
numbers. It is guaranteed that |f_real - f_saved| < 10^(-scalingFactor)
.
The algorithm used for scale compression is:
10^scalingFactor
Modifier and Type | Class and Description |
---|---|
static class |
ch.systemsx.cisd.hdf5.HDF5AbstractStorageFeatures.DataSetReplacementPolicy
The policy on how to deal with write access to existing datasets.
|
static class |
ch.systemsx.cisd.hdf5.HDF5AbstractStorageFeatures.HDF5AbstractStorageFeatureBuilder |
static class |
HDF5FloatStorageFeatures.HDF5FloatStorageFeatureBuilder
A builder for storage features.
|
Modifier and Type | Field and Description |
---|---|
static byte |
DEFAULT_DEFLATION_LEVEL
A constant that specifies the default deflation level (gzip compression).
|
static HDF5FloatStorageFeatures |
FLOAT_CHUNKED
Represents a chunked storage layout.
|
static HDF5FloatStorageFeatures |
FLOAT_CHUNKED_DELETE
Represents a chunked storage layout.
|
static HDF5FloatStorageFeatures |
FLOAT_CHUNKED_KEEP
Represents a chunked storage layout.
|
static HDF5FloatStorageFeatures |
FLOAT_COMPACT
Represents a compact storage layout.
|
static HDF5FloatStorageFeatures |
FLOAT_COMPACT_DELETE
Represents a compact storage layout.
|
static HDF5FloatStorageFeatures |
FLOAT_COMPACT_KEEP
Represents a compact storage layout.
|
static HDF5FloatStorageFeatures |
FLOAT_CONTIGUOUS
Represents a contiguous storage layout.
|
static HDF5FloatStorageFeatures |
FLOAT_CONTIGUOUS_DELETE
Represents a contiguous storage layout.
|
static HDF5FloatStorageFeatures |
FLOAT_CONTIGUOUS_KEEP
Represents a contiguous storage layout.
|
static HDF5FloatStorageFeatures |
FLOAT_DEFLATE
Represents 'standard compression', that is deflation with the default deflation level.
|
static HDF5FloatStorageFeatures |
FLOAT_DEFLATE_DELETE
Represents 'standard compression', that is deflation with the default deflation level.
|
static HDF5FloatStorageFeatures |
FLOAT_DEFLATE_KEEP
Represents 'standard compression', that is deflation with the default deflation level.
|
static HDF5FloatStorageFeatures |
FLOAT_DEFLATE_MAX
Represents 'maximal compression', that is deflation with the maximal deflation level.
|
static HDF5FloatStorageFeatures |
FLOAT_DEFLATE_MAX_DELETE
Represents 'maximal compression', that is deflation with the maximal deflation level.
|
static HDF5FloatStorageFeatures |
FLOAT_DEFLATE_MAX_KEEP
Represents 'maximal compression', that is deflation with the maximal deflation level.
|
static HDF5FloatStorageFeatures |
FLOAT_NO_COMPRESSION
Represents 'no compression', use default storage layout.
|
static HDF5FloatStorageFeatures |
FLOAT_NO_COMPRESSION_DELETE
Represents 'no compression', use default storage layout.
|
static HDF5FloatStorageFeatures |
FLOAT_NO_COMPRESSION_KEEP
Represents 'no compression', use default storage layout.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING1
Represents scaling with scaling factor 1 for float values.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING1_DEFLATE
Represents scaling with scaling factor 1 for float values combined with deflation using the
default deflation level.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING1_DEFLATE_DELETE
Represents scaling with scaling factor 1 for float values combined with deflation using the
default deflation level.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING1_DEFLATE_KEEP
Represents scaling with scaling factor 1 for float values combined with deflation using the
default deflation level.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING1_DELETE
Represents scaling with scaling factor 1 for float values.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING1_KEEP
Represents scaling with scaling factor 1 for float values.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING2
Represents scaling with scaling factor 2 for float values.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING2_DEFLATE
Represents scaling with scaling factor 2 for float values combined with deflation using the
default deflation level.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING2_DEFLATE_DELETE
Represents scaling with scaling factor 2 for float values combined with deflation using the
default deflation level.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING2_DEFLATE_KEEP
Represents scaling with scaling factor 2 for float values combined with deflation using the
default deflation level.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING2_DELETE
Represents scaling with scaling factor 2 for float values.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING2_KEEP
Represents scaling with scaling factor 2 for float values.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING3
Represents scaling with scaling factor 3 for float values.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING3_DEFLATE
Represents scaling with scaling factor 3 for float values combined with deflation using the
default deflation level.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING3_DEFLATE_DELETE
Represents scaling with scaling factor 3 for float values combined with deflation using the
default deflation level.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING3_DEFLATE_KEEP
Represents scaling with scaling factor 3 for float values combined with deflation using the
default deflation level.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING3_DELETE
Represents scaling with scaling factor 3 for float values.
|
static HDF5FloatStorageFeatures |
FLOAT_SCALING3_KEEP
Represents scaling with scaling factor 3 for float values.
|
static HDF5FloatStorageFeatures |
FLOAT_SHUFFLE_DEFLATE
Represents 'standard compression' with a pre-filter shuffle, that is deflation with the
default deflation level.
|
static byte |
MAX_DEFLATION_LEVEL
A constant that specifies the maximal deflation level (gzip compression).
|
static byte |
NO_DEFLATION_LEVEL
A constant that specifies that no deflation should be used.
|
Modifier and Type | Method and Description |
---|---|
static HDF5FloatStorageFeatures.HDF5FloatStorageFeatureBuilder |
build()
Returns a new storage feature builder.
|
static HDF5FloatStorageFeatures.HDF5FloatStorageFeatureBuilder |
build(ch.systemsx.cisd.hdf5.HDF5AbstractStorageFeatures template)
Returns a new storage feature builder, initializing from template.
|
static HDF5FloatStorageFeatures |
createDeflateAndFloatScaling(int scalingFactor)
Creates a
HDF5FloatStorageFeatures object that represents deflation with the default
deflation level and float scaling with the given scalingFactor. |
static HDF5FloatStorageFeatures |
createDeflateAndFloatScaling(int deflateLevel,
int scalingFactor)
Creates a
HDF5FloatStorageFeatures object that represents deflation with the given
deflateLevel and float scaling with the given scalingFactor. |
static HDF5FloatStorageFeatures |
createDeflateAndFloatScalingKeep(int scalingFactor)
Creates a
HDF5FloatStorageFeatures object that represents deflation with the default
deflation level and float scaling with the given scalingFactor. |
static HDF5FloatStorageFeatures |
createDeflateAndFloatScalingKeep(int deflateLevel,
int scalingFactor)
Creates a
HDF5FloatStorageFeatures object that represents deflation with the given
deflateLevel and float scaling with the given scalingFactor. |
static HDF5FloatStorageFeatures |
createDeflation(int deflationLevel)
Creates a
HDF5FloatStorageFeatures object that represents deflation with the given
deflationLevel. |
static HDF5FloatStorageFeatures |
createDeflationDelete(int deflationLevel)
Creates a
HDF5FloatStorageFeatures object that represents deflation with the given
deflationLevel. |
static HDF5FloatStorageFeatures |
createDeflationKeep(int deflationLevel)
Creates a
HDF5FloatStorageFeatures object that represents deflation with the given
deflationLevel. |
static HDF5FloatStorageFeatures |
createFloatScaling(int scalingFactor)
Creates a
HDF5FloatStorageFeatures object that represents float scaling with the
given scalingFactor. |
static HDF5FloatStorageFeatures |
createFloatScalingKeep(int scalingFactor)
Creates a
HDF5FloatStorageFeatures object that represents float scaling with the
given scalingFactor. |
static HDF5FloatStorageFeatures |
createFromGeneric(HDF5GenericStorageFeatures storageFeatures)
Create a corresponding
HDF5FloatStorageFeatures for the given
HDF5GenericStorageFeatures . |
ch.systemsx.cisd.hdf5.HDF5AbstractStorageFeatures.DataSetReplacementPolicy |
getDatasetReplacementPolicy()
Returns the policy of this storage feature object regarding replacing or keeping already
existing datasets.
|
byte |
getDeflateLevel()
Returns the deflate level of this storage feature object.
|
byte |
getScalingFactor()
Returns the scaling factor of this storage feature object.
|
boolean |
isDeflating()
Returns
true , if this storage feature object deflates data. |
boolean |
isScaling()
Returns
true , if this storage feature object scales data. |
boolean |
isShuffleBeforeDeflate()
Returns
true , if this storage feature object performs shuffling before deflating
the data. |
HDF5StorageLayout |
tryGetProposedLayout()
Returns the proposed storage layout, or
null , if no particular storage layout
should be proposed. |
public static final HDF5FloatStorageFeatures FLOAT_NO_COMPRESSION
public static final HDF5FloatStorageFeatures FLOAT_NO_COMPRESSION_KEEP
Keep existing data set and apply only if a new data set has to be created.
public static final HDF5FloatStorageFeatures FLOAT_NO_COMPRESSION_DELETE
Delete an existing data set before writing the new one. Always apply the chosen settings.
This allows to overwrite the IHDF5WriterConfigurator.keepDataSetsIfTheyExist()
setting.
public static final HDF5FloatStorageFeatures FLOAT_COMPACT
public static final HDF5FloatStorageFeatures FLOAT_COMPACT_KEEP
Keep existing data set and apply only if a new data set has to be created.
public static final HDF5FloatStorageFeatures FLOAT_COMPACT_DELETE
Delete an existing data set before writing the new one. Always apply the chosen settings.
This allows to overwrite the IHDF5WriterConfigurator.keepDataSetsIfTheyExist()
setting.
public static final HDF5FloatStorageFeatures FLOAT_CONTIGUOUS
public static final HDF5FloatStorageFeatures FLOAT_CONTIGUOUS_KEEP
Keep existing data set and apply only if a new data set has to be created.
public static final HDF5FloatStorageFeatures FLOAT_CONTIGUOUS_DELETE
Delete an existing data set before writing the new one. Always apply the chosen settings.
This allows to overwrite the IHDF5WriterConfigurator.keepDataSetsIfTheyExist()
setting.
public static final HDF5FloatStorageFeatures FLOAT_CHUNKED
public static final HDF5FloatStorageFeatures FLOAT_CHUNKED_KEEP
Keep existing data set and apply only if a new data set has to be created.
public static final HDF5FloatStorageFeatures FLOAT_CHUNKED_DELETE
Delete an existing data set before writing the new one. Always apply the chosen settings.
This allows to overwrite the IHDF5WriterConfigurator.keepDataSetsIfTheyExist()
setting.
public static final HDF5FloatStorageFeatures FLOAT_DEFLATE
public static final HDF5FloatStorageFeatures FLOAT_SHUFFLE_DEFLATE
public static final HDF5FloatStorageFeatures FLOAT_DEFLATE_KEEP
Keep existing data set and apply only if a new data set has to be created.
public static final HDF5FloatStorageFeatures FLOAT_DEFLATE_DELETE
Delete an existing data set before writing the new one. Always apply the chosen settings.
This allows to overwrite the IHDF5WriterConfigurator.keepDataSetsIfTheyExist()
setting.
public static final HDF5FloatStorageFeatures FLOAT_DEFLATE_MAX
public static final HDF5FloatStorageFeatures FLOAT_DEFLATE_MAX_KEEP
Keep existing data set and apply only if a new data set has to be created.
public static final HDF5FloatStorageFeatures FLOAT_DEFLATE_MAX_DELETE
Delete an existing data set before writing the new one. Always apply the chosen settings.
This allows to overwrite the IHDF5WriterConfigurator.keepDataSetsIfTheyExist()
setting.
public static final HDF5FloatStorageFeatures FLOAT_SCALING1
public static final HDF5FloatStorageFeatures FLOAT_SCALING1_KEEP
Keep existing data set and apply only if a new data set has to be created.
public static final HDF5FloatStorageFeatures FLOAT_SCALING1_DELETE
Delete an existing data set before writing the new one. Always apply the chosen settings.
This allows to overwrite the IHDF5WriterConfigurator.keepDataSetsIfTheyExist()
setting.
public static final HDF5FloatStorageFeatures FLOAT_SCALING1_DEFLATE
public static final HDF5FloatStorageFeatures FLOAT_SCALING1_DEFLATE_KEEP
Keep existing data set and apply only if a new data set has to be created.
public static final HDF5FloatStorageFeatures FLOAT_SCALING1_DEFLATE_DELETE
Delete an existing data set before writing the new one. Always apply the chosen settings.
This allows to overwrite the IHDF5WriterConfigurator.keepDataSetsIfTheyExist()
setting.
public static final HDF5FloatStorageFeatures FLOAT_SCALING2
public static final HDF5FloatStorageFeatures FLOAT_SCALING2_KEEP
Keep existing data set and apply only if a new data set has to be created.
public static final HDF5FloatStorageFeatures FLOAT_SCALING2_DELETE
Delete an existing data set before writing the new one. Always apply the chosen settings.
This allows to overwrite the IHDF5WriterConfigurator.keepDataSetsIfTheyExist()
setting.
public static final HDF5FloatStorageFeatures FLOAT_SCALING2_DEFLATE
public static final HDF5FloatStorageFeatures FLOAT_SCALING2_DEFLATE_KEEP
Keep existing data set and apply only if a new data set has to be created.
public static final HDF5FloatStorageFeatures FLOAT_SCALING2_DEFLATE_DELETE
Delete an existing data set before writing the new one. Always apply the chosen settings.
This allows to overwrite the IHDF5WriterConfigurator.keepDataSetsIfTheyExist()
setting.
public static final HDF5FloatStorageFeatures FLOAT_SCALING3
public static final HDF5FloatStorageFeatures FLOAT_SCALING3_KEEP
Keep existing data set and apply only if a new data set has to be created.
public static final HDF5FloatStorageFeatures FLOAT_SCALING3_DELETE
Delete an existing data set before writing the new one. Always apply the chosen settings.
This allows to overwrite the IHDF5WriterConfigurator.keepDataSetsIfTheyExist()
setting.
public static final HDF5FloatStorageFeatures FLOAT_SCALING3_DEFLATE
public static final HDF5FloatStorageFeatures FLOAT_SCALING3_DEFLATE_KEEP
Keep existing data set and apply only if a new data set has to be created.
public static final HDF5FloatStorageFeatures FLOAT_SCALING3_DEFLATE_DELETE
Delete an existing data set before writing the new one. Always apply the chosen settings.
This allows to overwrite the IHDF5WriterConfigurator.keepDataSetsIfTheyExist()
setting.
public static final byte NO_DEFLATION_LEVEL
public static final byte DEFAULT_DEFLATION_LEVEL
public static final byte MAX_DEFLATION_LEVEL
public static HDF5FloatStorageFeatures.HDF5FloatStorageFeatureBuilder build()
public static HDF5FloatStorageFeatures.HDF5FloatStorageFeatureBuilder build(ch.systemsx.cisd.hdf5.HDF5AbstractStorageFeatures template)
public static HDF5FloatStorageFeatures createFromGeneric(HDF5GenericStorageFeatures storageFeatures)
HDF5FloatStorageFeatures
for the given
HDF5GenericStorageFeatures
.public static HDF5FloatStorageFeatures createDeflation(int deflationLevel)
HDF5FloatStorageFeatures
object that represents deflation with the given
deflationLevel.public static HDF5FloatStorageFeatures createDeflationKeep(int deflationLevel)
HDF5FloatStorageFeatures
object that represents deflation with the given
deflationLevel.
Keep existing data set and apply only if a new data set has to be created.
public static HDF5FloatStorageFeatures createDeflationDelete(int deflationLevel)
HDF5FloatStorageFeatures
object that represents deflation with the given
deflationLevel.
Delete an existing data set before writing the new one. Always apply the chosen settings.
This allows to overwrite the IHDF5WriterConfigurator.keepDataSetsIfTheyExist()
setting.
public static HDF5FloatStorageFeatures createFloatScaling(int scalingFactor)
HDF5FloatStorageFeatures
object that represents float scaling with the
given scalingFactor.public static HDF5FloatStorageFeatures createFloatScalingKeep(int scalingFactor)
HDF5FloatStorageFeatures
object that represents float scaling with the
given scalingFactor.
Keep existing data set and apply only if a new data set has to be created.
public static HDF5FloatStorageFeatures createDeflateAndFloatScaling(int scalingFactor)
HDF5FloatStorageFeatures
object that represents deflation with the default
deflation level and float scaling with the given scalingFactor.public static HDF5FloatStorageFeatures createDeflateAndFloatScalingKeep(int scalingFactor)
HDF5FloatStorageFeatures
object that represents deflation with the default
deflation level and float scaling with the given scalingFactor.
Keep existing data set and apply only if a new data set has to be created.
public static HDF5FloatStorageFeatures createDeflateAndFloatScaling(int deflateLevel, int scalingFactor)
HDF5FloatStorageFeatures
object that represents deflation with the given
deflateLevel and float scaling with the given scalingFactor.public static HDF5FloatStorageFeatures createDeflateAndFloatScalingKeep(int deflateLevel, int scalingFactor)
HDF5FloatStorageFeatures
object that represents deflation with the given
deflateLevel and float scaling with the given scalingFactor.
Keep existing data set and apply only if a new data set has to be created.
public HDF5StorageLayout tryGetProposedLayout()
null
, if no particular storage layout
should be proposed.public ch.systemsx.cisd.hdf5.HDF5AbstractStorageFeatures.DataSetReplacementPolicy getDatasetReplacementPolicy()
public boolean isDeflating()
true
, if this storage feature object deflates data.public boolean isScaling()
true
, if this storage feature object scales data.public boolean isShuffleBeforeDeflate()
true
, if this storage feature object performs shuffling before deflating
the data.public byte getDeflateLevel()
public byte getScalingFactor()