blosc2.CParams#
- class blosc2.CParams(codec: ~blosc2.Codec | int = Codec.ZSTD, codec_meta: int = 0, clevel: int = 1, use_dict: bool = False, typesize: int = 8, nthreads: int = <factory>, blocksize: int = 0, splitmode: ~blosc2.SplitMode = SplitMode.ALWAYS_SPLIT, filters: list[~blosc2.Filter | int] = <factory>, filters_meta: list[int] = <factory>, tuner: ~blosc2.Tuner = Tuner.STUNE)#
Dataclass for hosting the different compression parameters.
- Parameters:
codec¶ (
Codec
or int) – The compressor code. Default isCodec.ZSTD
.codec_meta¶ (int) – The metadata for the compressor code. Default is 0.
clevel¶ (int) – The compression level from 0 (no compression) to 9 (maximum compression). Default is 1.
use_dict¶ (bool) – Whether to use dictionaries when compressing (only for
blosc2.Codec.ZSTD
). Default is False.typesize¶ (int) – The data type size, ranging from 1 to 255. Default is 8.
nthreads¶ (int) – The number of threads to use internally. By default, the value of
blosc2.nthreads
is used. If not set withblosc2.set_nthreads()
, blosc2 computes a good guess for it.blocksize¶ (int) – The requested size of the compressed blocks. If set to 0 (the default) blosc2 will choose the size automatically.
splitmode¶ (
SplitMode
) – The split mode for the blocks. The default value isSplitMode.ALWAYS_SPLIT
.filters¶ (
Filter
or int list) – The sequence of filters. Default: [Filter.NOFILTER
,Filter.NOFILTER
,Filter.NOFILTER
,Filter.NOFILTER
,Filter.NOFILTER
,Filter.SHUFFLE
].filters_meta¶ (list) – The metadata for filters. Default: [0, 0, 0, 0, 0, 0].
tuner¶ (
Tuner
) – The tuner to use. Default:Tuner.STUNE
.
- __init__(codec: ~blosc2.Codec | int = Codec.ZSTD, codec_meta: int = 0, clevel: int = 1, use_dict: bool = False, typesize: int = 8, nthreads: int = <factory>, blocksize: int = 0, splitmode: ~blosc2.SplitMode = SplitMode.ALWAYS_SPLIT, filters: list[~blosc2.Filter | int] = <factory>, filters_meta: list[int] = <factory>, tuner: ~blosc2.Tuner = Tuner.STUNE) None #
Methods
__init__
([codec, codec_meta, clevel, ...])Attributes
blocksize
clevel
codec
codec_meta
splitmode
tuner
typesize
use_dict
nthreads
filters
filters_meta