Filters
HDF5 supports filters for compression and validation: these are applied sequentially to each chunk of a dataset when writing data, and in reverse order when reading data.
These can be set by passing a filter or vector of filters as a filters
property to DatasetCreateProperties
or via the filters
keyword argument of create_dataset
.
Example
HDF5.Filters
— ModuleHDF5.Filters
This module contains the interface for using filters in HDF5.jl.
Example Usage
using HDF5
using HDF5.Filters
# Create a new file
fn = tempname()
# Create test data
data = rand(1000, 1000)
# Open temp file for writing
f = h5open(fn, "w")
# Create datasets
dsdeflate = create_dataset(f, "deflate", datatype(data), dataspace(data),
chunk=(100, 100), deflate=3)
dsshufdef = create_dataset(f, "shufdef", datatype(data), dataspace(data),
chunk=(100, 100), shuffle=true, deflate=3)
dsfiltdef = create_dataset(f, "filtdef", datatype(data), dataspace(data),
chunk=(100, 100), filters=Filters.Deflate(3))
dsfiltshufdef = create_dataset(f, "filtshufdef", datatype(data), dataspace(data),
chunk=(100, 100), filters=[Filters.Shuffle(), Filters.Deflate(3)])
# Write data
write(dsdeflate, data)
write(dsshufdef, data)
write(dsfiltdef, data)
write(dsfiltshufdef, data)
close(f)
Additonal Examples
See test/filter.jl for further examples.
Built-in Filters
HDF5.Filters.Deflate
— TypeDeflate(level=5)
Deflate/ZLIB lossless compression filter. level
is an integer between 0 and 9, inclusive, denoting the compression level, with 0 being no compression, 9 being the highest compression (but slowest speed).
External links
HDF5.Filters.Shuffle
— TypeShuffle()
The shuffle filter de-interlaces a block of data by reordering the bytes. All the bytes from one consistent byte position of each data element are placed together in one block; all bytes from a second consistent byte position of each data element are placed together a second block; etc. For example, given three data elements of a 4-byte datatype stored as 012301230123, shuffling will re-order data as 000111222333. This can be a valuable step in an effective compression algorithm because the bytes in each byte position are often closely related to each other and putting them together can increase the compression ratio.
As implied above, the primary value of the shuffle filter lies in its coordinated use with a compression filter; it does not provide data compression when used alone. When the shuffle filter is applied to a dataset immediately prior to the use of a compression filter, the compression ratio achieved is often superior to that achieved by the use of a compression filter without the shuffle filter.
External links
HDF5.Filters.Fletcher32
— TypeFletcher32()
The Fletcher32 checksum filter. This doesn't perform compression, but instead checks the validity of the stored data.
This should be applied after any lossy filters have been applied.
External links
HDF5.Filters.Szip
— TypeSzip(coding=:nn, pixels_per_block=8)
Szip compression lossless filter. Options:
coding
: the coding method: either:ec
(entropy coding) or:nn
(nearest neighbors, default)pixels_per_block
: The number of pixels or data elements in each data block (typically 8, 10, 16, or 32)
External links
HDF5.Filters.NBit
— TypeHDF5.Filters.ScaleOffset
— TypeScaleOffset(scale_type::Integer, scale_offset::Integer)
The scale-offset filter.
External links
HDF5.Filters.ExternalFilter
— TypeExternalFilter(filter_id::API.H5Z_filter_t, flags::Cuint, data::Vector{Cuint}, name::String, config::Cuint)
ExternalFilter(filter_id, flags, data::Integer...)
ExternalFilter(filter_id, data::AbstractVector{<:Integer} = Cuint[])
Intended to support arbitrary, unregistered, external filters. Allows the quick creation of filters using internal/proprietary filters without subtyping HDF5.Filters.Filter
. Users are instead encouraged to define subtypes on HDF5.Filters.Filter
.
Fields / Arguments
filter_id
- (required)Integer
filter identifer.flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
name
- (optional)String
describing the name of the filter. Defaults to "Unknown Filter with id [filter_id]"config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See also:
flags
bits
API.H5Z_FLAG_OPTIONAL
API.H5Z_FLAG_MANDATORY
config
bits
API.H5Z_FILTER_CONFIG_ENCODE_ENABLED
API.H5Z_FILTER_CONFIG_DECODE_ENABLED
External Filter Packages
Several external Julia packages implement HDF5 filter plugins in Julia. As they are independent of HDF5.jl, they must be installed in order to use their plugins.
The H5Zbitshuffle.jl, H5Zblosc.jl, H5Zbzip2.jl, H5Zlz4.jl, and H5Zzstd.jl packages are maintained as independent subdirectory packages within the HDF5.jl repository.
Extension packages
For Julia 1.9 and greater, the external filter packages listed above at version 0.2 and greater are loose wrappers around extension packages. The filter extension packages currently implemented are as follows:
- bitshufflejllext
- H5Zblosc_ext
- H5Zbzip2_ext
- H5Zlz4_ext
- H5Zzstd_ext
using HDF5, CodecZstd
const CodecZstdExt = Base.get_extension(HDF5, :CodecZstdExt)
using .CodecZstdExt
filter = ZstdFilter(5)
H5Zblosc.jl
BloscExt.BloscFilter
— TypeBloscFilter(;level=5, shuffle=true, compressor="blosclz")
The Blosc compression filter, using Blosc.jl. Options:
level
: compression levelshuffle
: whether to shuffle data before compressing (this option should be used instead of theShuffle
filter)compressor
: the compression algorithm. CallBlosc.compressors()
for the available compressors.
External links
H5Zbzip2.jl
CodecBzip2Ext.Bzip2Filter
— TypeBzip2Filter(blockSize100k)
Apply Bzip2 compression. The filter id is 307.
External Links
H5Zlz4.jl
CodecLz4Ext.Lz4Filter
— TypeLz4Filter(blockSize)
Apply LZ4 compression. blockSize
is the main argument. The filter id is 32004.
External Links
H5Zzstd.jl
CodecZstdExt.ZstdFilter
— TypeZstdFilter(clevel)
Zstandard compression filter. clevel
determines the compression level.
External Links
H5Zzstd.H5Zzstd
— ModuleH5Zzstd
Transitional package to HDF5/CodecZstdExt.
The contents of this package are now contained within the package extension CodecZstdExt. Loading this package will load the package extension.
H5Zbitshuffle
bitshuffle_jll_ext.BitshuffleFilter
— TypeBitshuffleFilter(blocksize=0,compressor=:none,comp_level=0)
The Bitshuffle filter can optionally include compression :lz4 or :zstd. For :zstd comp_level can be provided. This is ignored for :lz4 compression. If blocksize
is zero the default bitshuffle blocksize is used.
H5Zbitshuffle.H5Zbitshuffle
— ModuleThe bitshuffle filter for HDF5. See https://portal.hdfgroup.org/display/support/Filters#Filters-32008 and https://github.com/kiyo-masui/bitshuffle for details.
H5Zbitshuffle.bitshuffle_jll_ext
— ModuleThe bitshuffle filter for HDF5. See https://portal.hdfgroup.org/display/support/Filters#Filters-32008 and https://github.com/kiyo-masui/bitshuffle for details.
Other External Filters
Additional filters can be dynamically loaded by the HDF5 library. See External Links below for more information.
Using an ExternalFilter
ExternalFilter
can be used to insert a dynamically loaded filter into the FilterPipeline
in an ad-hoc fashion.
Example for bitshuffle
If we do not have a defined subtype of Filter
for the bitshuffle filter we can create an ExternalFilter
. From the header file or list of registered plugins, we see that the bitshuffle filter has an id of 32008
.
Furthermore, the header describes two options:
block_size
(optional). Default is0
.compression
- This can be0
orBSHUF_H5_COMPRESS_LZ4
(2
as defined in the C header)
using HDF5.Filters
bitshuf = ExternalFilter(32008, Cuint[0, 0])
bitshuf_comp = ExternalFilter(32008, Cuint[0, 2])
data_A = rand(0:31, 1024)
data_B = rand(32:63, 1024)
filename, _ = mktemp()
h5open(filename, "w") do h5f
# Indexing style
h5f["ex_data_A", chunk=(32,), filters=bitshuf] = data_A
# Procedural style
d, dt = create_dataset(h5f, "ex_data_B", data_B, chunk=(32,), filters=[bitshuf_comp])
write(d, data_B)
end
Registered Filter Helpers
The HDF Group maintains a list of registered filters which have been assigned a filter ID number. The module Filters.Registered
contains information about registered filters including functions to create an ExternalFilter
for each registered filter.
Creating a new Filter type
Examining the bitshuffle filter source code we see that three additional data components get prepended to the options. These are
- The major version
- The minor version
- The element size in bytes of the type via
H5Tget_size
.
import HDF5.Filters: FILTERS, Filter, FilterPipeline, filterid
using HDF5.API
const H5Z_BSHUF_ID = API.H5Z_filter_t(32008)
struct BitShuffleFilter <: HDF5.Filters.Filter
major::Cuint
minor::Cuint
elem_size::Cuint
block_size::Cuint
compression::Cuint
BitShuffleFilter(block_size, compression) = new(0, 0, 0, block_size, compression)
end
# filterid is the only required method of the filter interface
# since we are using an externally registered filter
filterid(::Type{BitShuffleFilter}) = H5Z_BSHUF_ID
FILTERS[H5Z_BSHUF_ID] = BitShuffleFilter
function Base.push!(p::FilterPipeline, f::BitShuffleFilter)
ref = Ref(f)
GC.@preserve ref begin
API.h5p_set_filter(p.plist, H5Z_BSHUF_ID, API.H5Z_FLAG_OPTIONAL, 2, pointer_from_objref(ref) + sizeof(Cuint)*3)
end
return p
end
Because the first three elements are not provided directly via h5p_set_filter
, we also needed to implement a custom Base.push!
into the FilterPipeline
.
Filter Interface
The filter interface is used to describe filters and obtain information on them.
HDF5.Filters.Filter
— TypeFilter
Abstract type to describe HDF5 Filters. See the Extended Help for information on implementing a new filter.
Extended Help
Filter interface
The Filter interface is implemented upon the Filter subtype.
See API.h5z_register
for details.
Required Methods to Implement
filterid
- registered filter IDfilter_func
- implement the actual filter
Optional Methods to Implement
filtername
- defaults to "Unnamed Filter"encoder_present
- defaults to truedecoder_present
- defaults to truecan_apply_func
- defaults to nothingset_local_func
- defaults to nothing
Advanced Methods to Implement
can_apply_cfunc
- Defaults to wrapping @cfunction around the result ofcan_apply_func
set_local_cfunc
- Defaults to wrapping @cfunction around the result ofset_local_func
filter_cfunc
- Defaults to wrapping @cfunction around the result offilter_func
register_filter
- Defaults to using the above functions to register the filter
Implement the Advanced Methods to avoid @cfunction from generating a runtime closure which may not work on all systems.
HDF5.Filters.FilterPipeline
— TypeFilterPipeline(plist::DatasetCreateProperties)
The filter pipeline associated with plist
. Acts like a AbstractVector{Filter}
, supporting the following operations:
length(pipeline)
: the number of filters.pipeline[i]
to return thei
th filter.pipeline[FilterType]
to return a filter of typeFilterType
push!(pipline, filter)
to add an extra filter to the pipeline.append!(pipeline, filters)
to add multiple filters to the pipeline.delete!(pipeline, FilterType)
to remove a filter of typeFilterType
from the pipeline.empty!(pipeline)
to remove all filters from the pipeline.
HDF5.Filters.UnknownFilter
— TypeUnknownFilter
Unknown filter type. Alias for ExternalFilter
(see related documentation).
HDF5.Filters.FILTERS
— ConstantFILTERS
Maps filter id to filter type.
HDF5.Filters.EXTERNAL_FILTER_JULIA_PACKAGES
— ConstantEXTERNAL_FILTER_JULIA_PACKAGES
Maps filter id to the Julia package name that contains the filter.
HDF5.Filters.filterid
— Functionfilterid(F) where {F <: Filter}
The internal filter id of a filter of type F
.
HDF5.Filters.isavailable
— Functionisavailable(filter_or_id)
Given a subtype of Filters.Filter
or the filter ID number as an integer, return true
if the filter is available and false
otherwise.
HDF5.Filters.isdecoderenabled
— Functionisdecoderenabled(filter_or_id)
Given a subtype of Filters.Filter
or the filter ID number as an integer, return true
if the filter can decode or decompress data.
HDF5.Filters.isencoderenabled
— Functionisencoderenabled(filter_or_id)
Given a subtype of Filters.Filter
or the filter ID number as an integer, return true
if the filter can encode or compress data.
HDF5.Filters.decoder_present
— Functiondecoder_present(::Type{F}) where {F<:Filter}
Can the filter decode or decompress the data? Defaults to true. Returns a Bool. See API.h5z_register
HDF5.Filters.encoder_present
— Functionencoder_present(::Type{F}) where {F<:Filter}
Can the filter have an encode or compress the data? Defaults to true. Returns a Bool. See API.h5z_register
.
HDF5.Filters.ensure_filters_available
— FunctionError if all filters in a filter pipeline are not available.
HDF5.Filters.filtername
— Functionfiltername(::Type{F}) where {F<:Filter}
What is the name of a filter? Defaults to "Unnamed Filter" Returns a String describing the filter. See API.h5z_register
HDF5.Filters.can_apply_func
— Functioncan_apply_func(::Type{F}) where {F<:Filter}
Return a function indicating whether the filter can be applied or nothing
if no function exists. The function signature is func(dcpl_id::API.hid_t, type_id::API.hid_t, space_id::API.hid_t)
. See API.h5z_register
HDF5.Filters.can_apply_cfunc
— Functioncan_apply_cfunc(::Type{F}) where {F<:Filter}
Return a C function pointer for the can apply function. By default, this will return the result of using @cfunction
on the function specified by can_apply_func(F)
or C_NULL
if nothing
.
Overriding this will allow @cfunction
to return a Ptr{Nothing}
rather than a CFunction
` closure which may not work on all systems.
HDF5.Filters.set_local_func
— Functionset_local_func(::Type{F}) where {F<:Filter}
Return a function that sets dataset specific parameters or nothing
if no function exists. The function signature is func(dcpl_id::API.hid_t, type_id::API.hid_t, space_id::API.hid_t)
. See API.h5z_register
.
HDF5.Filters.set_local_cfunc
— Functionset_local_cfunc(::Type{F}) where {F<:Filter}
Return a C function pointer for the set local function. By default, this will return the result of using @cfunction
on the function specified by set_local_func(F)
or C_NULL
if nothing
.
Overriding this will allow @cfunction
to return a Ptr{Nothing}
rather than a CFunction
` closure which may not work on all systems.
HDF5.Filters.filter_func
— Functionfilter_func(::Type{F}) where {F<:Filter}
Returns a function that performs the actual filtering.
See API.h5z_register
HDF5.Filters.filter_cfunc
— Functionfilter_cfunc(::Type{F}) where {F<:Filter}
Return a C function pointer for the filter function. By default, this will return the result of using @cfunction
on the function specified by filter_func(F)
or will throw an error if nothing
.
Overriding this will allow @cfunction
to return a Ptr{Nothing}
rather than a CFunction
` closure which may not work on all systems.
HDF5.Filters.register_filter
— Functionregister_filter(::Type{F}) where F <: Filter
Register the filter with the HDF5 library via API.h5z_register
. Also add F to the FILTERS dictionary.
Registered Filters
HDF5.Filters.Registered
— ModuleHDF5.Filters.Registered
Module containing convenience methods to create ExternalFilter
instances of HDF5 registered filters.
This module does not implement any filter or guarantee filter availability. Rather the functions within this module create ExternalFilter
instances for convenience. These instances can be used to determine if a filter is available. They can also be incorporated as part of a filter pipeline.
Examine REGISTERED_FILTERS
, a Dict{H5Z_filter_t, Function}
, for a list of filter functions contained within this module, which are exported.
julia> println.(values(HDF5.Filters.Registered.REGISTERED_FILTERS));
FCIDECOMPFilter
LZOFilter
BitGroomFilter
SZ3Filter
Delta_RiceFilter
fpzipFilter
LPC_RiceFilter
LZFFilter
FLACFilter
VBZFilter
FAPECFilter
zfpFilter
CBFFilter
JPEG_XRFilter
LZ4Filter
BLOSC2Filter
ZstandardFilter
SZFilter
Granular_BitRoundFilter
JPEGFilter
SnappyFilter
B³DFilter
APAXFilter
BLOSCFilter
SPDPFilter
bitshuffleFilter
MAFISCFilter
BZIP2Filter
CCSDS_123Filter
JPEG_LSFilter
HDF5.Filters.Registered.APAXFilter
— FunctionAPAXFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
APAXFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for APAX with filter id 32005. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.BLOSC2Filter
— FunctionBLOSC2Filter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
BLOSC2Filter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for BLOSC2 with filter id 32026. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.BLOSCFilter
— FunctionBLOSCFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
BLOSCFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for BLOSC with filter id 32001. Users are instead encouraged to use the Julia package H5Zblosc.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.BZIP2Filter
— FunctionBZIP2Filter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
BZIP2Filter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for BZIP2 with filter id 307. Users are instead encouraged to use the Julia package H5Zbzip2.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.BitGroomFilter
— FunctionBitGroomFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
BitGroomFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for BitGroom with filter id 32022. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.B³DFilter
— FunctionB³DFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
B³DFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for B³D with filter id 32016. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.CBFFilter
— FunctionCBFFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
CBFFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for CBF with filter id 32006. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.CCSDS_123Filter
— FunctionCCSDS_123Filter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
CCSDS_123Filter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for CCSDS_123 with filter id 32011. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.Delta_RiceFilter
— FunctionDelta_RiceFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
Delta_RiceFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for Delta_Rice with filter id 32025. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.FAPECFilter
— FunctionFAPECFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
FAPECFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for FAPEC with filter id 32021. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.FCIDECOMPFilter
— FunctionFCIDECOMPFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
FCIDECOMPFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for FCIDECOMP with filter id 32018. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.FLACFilter
— FunctionFLACFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
FLACFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for FLAC with filter id 32027. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.Granular_BitRoundFilter
— FunctionGranular_BitRoundFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
Granular_BitRoundFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for Granular_BitRound with filter id 32023. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.JPEGFilter
— FunctionJPEGFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
JPEGFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for JPEG with filter id 32019. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.JPEG_LSFilter
— FunctionJPEG_LSFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
JPEG_LSFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for JPEG_LS with filter id 32012. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.JPEG_XRFilter
— FunctionJPEG_XRFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
JPEG_XRFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for JPEG_XR with filter id 32007. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.LPC_RiceFilter
— FunctionLPC_RiceFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
LPC_RiceFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for LPC_Rice with filter id 32010. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.LZ4Filter
— FunctionLZ4Filter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
LZ4Filter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for LZ4 with filter id 32004. Users are instead encouraged to use the Julia package H5Zlz4.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.LZFFilter
— FunctionLZFFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
LZFFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for LZF with filter id 32000. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.LZOFilter
— FunctionLZOFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
LZOFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for LZO with filter id 305. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.MAFISCFilter
— FunctionMAFISCFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
MAFISCFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for MAFISC with filter id 32002. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.SPDPFilter
— FunctionSPDPFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
SPDPFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for SPDP with filter id 32009. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.SZ3Filter
— FunctionSZ3Filter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
SZ3Filter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for SZ3 with filter id 32024. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.SZFilter
— FunctionSZFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
SZFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for SZ with filter id 32017. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.SnappyFilter
— FunctionSnappyFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
SnappyFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for Snappy with filter id 32003. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.VBZFilter
— FunctionVBZFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
VBZFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for VBZ with filter id 32020. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.ZstandardFilter
— FunctionZstandardFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
ZstandardFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for Zstandard with filter id 32015. Users are instead encouraged to use the Julia package H5Zzstd.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.available_registered_filters
— Methodavailable_registered_filters()::Dict{H5Z_filter_t, Function}
Return a Dict{H5Z_filter_t, Function}
listing the available filter ids and their corresponding convenience function.
HDF5.Filters.Registered.bitshuffleFilter
— FunctionbitshuffleFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
bitshuffleFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for bitshuffle with filter id 32008. Users are instead encouraged to use the Julia package H5Zbitshuffle.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.fpzipFilter
— FunctionfpzipFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
fpzipFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for fpzip with filter id 32014. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
HDF5.Filters.Registered.zfpFilter
— FunctionzfpFilter(flags=API.H5Z_FLAG_MANDATORY, data::AbstractVector{<: Integer}=Cuint[], config::Cuint=0)
zfpFilter(flags=API.H5Z_FLAG_MANDATORY, data::Integer...)
Create an ExternalFilter
for zfp with filter id 32013. Users should consider defining a subtype of Filter
to specify the data.
Fields / Arguments
flags
- (optional) bit vector describing general properties of the filter. Defaults toAPI.H5Z_FLAG_MANDATORY
data
- (optional) auxillary data for the filter. Seecd_values
. Defaults toCuint[]
config
- (optional) bit vector representing information about the filter regarding whether it is able to encode data, decode data, neither, or both. Defaults to0
.
See ExternalFilter
for valid argument values.
External Links
- A list of registered filter plugins can be found on the HDF Group website.
- See the HDF5 Documentation of HDF5 Filter Plugins for details.
- The source code for many external plugins have been collected in the HDFGroup hdf5_plugins repository.
- Compiled binaries of dynamically downloaded plugins by downloaded from HDF5 Group.