|
Zarr.NET
0.6.1
Zarr reader and writer in .NET
|
Blosc bytes-to-bytes codec. More...
Public Member Functions | |
| BloscCodec (string cname="lz4", int clevel=5, BloscShuffle shuffle=BloscShuffle.ByteShuffle, int typesize=1, int blocksize=0) | |
| Task< byte[]> | DecodeAsync (byte[] input, CancellationToken ct=default) |
| Decodes bytes produced by the previous codec step. | |
| Task< byte[]> | EncodeAsync (byte[] input, CancellationToken ct=default) |
| Encodes bytes for the next codec step. | |
Public Member Functions inherited from ZarrNET.IZarrCodec | |
Properties | |
| string | Name [get] |
| Codec name as it appears in zarr.json (e.g. "gzip", "zstd", "bytes"). | |
Properties inherited from ZarrNET.IZarrCodec | |
Blosc bytes-to-bytes codec.
Blosc is a meta-compressor: it applies an optional shuffle filter to improve compressibility, then compresses each block with an inner codec (lz4, zstd, zlib, blosclz, snappy). The 16-byte Blosc1 frame header stores the parameters needed to decode, so decoding is self-describing from the frame alone.
Blosc1 frame layout: [16-byte header] [bstarts table: nblocks x int32] – byte offsets of each block from the start of block data [block data – nblocks contiguous compressed/raw blocks]
Shuffle is applied per-block before compression, so unshuffle must also be per-block.
Supported inner codecs: lz4, lz4hc, zstd, zlib Unsupported (throws NotSupportedException): blosclz, snappy, bit-shuffle, split blocks
NuGet dependencies: K4os.Compression.LZ4 (lz4 / lz4hc inner codec) ZstdSharp.Port (zstd inner codec – already a project dependency)
| ZarrNET.BloscCodec.BloscCodec | ( | string | cname = "lz4", |
| int | clevel = 5, | ||
| BloscShuffle | shuffle = BloscShuffle::ByteShuffle, | ||
| int | typesize = 1, | ||
| int | blocksize = 0 ) |
| cname | Inner compressor name: "lz4", "lz4hc", "zstd", "zlib". |
| clevel | Compression level. Meaning is inner-codec-specific. |
| shuffle | Shuffle filter applied before compression. |
| typesize | Element size in bytes, used by the shuffle filter. |
| blocksize | Uncompressed block size in bytes. 0 = auto (256 KiB). |
| Task< byte[]> ZarrNET.BloscCodec.DecodeAsync | ( | byte[] | input, |
| CancellationToken | ct = default ) |
Decodes bytes produced by the previous codec step.
Implements ZarrNET.IZarrCodec.
| Task< byte[]> ZarrNET.BloscCodec.EncodeAsync | ( | byte[] | input, |
| CancellationToken | ct = default ) |
Encodes bytes for the next codec step.
Implements ZarrNET.IZarrCodec.
|
get |
Codec name as it appears in zarr.json (e.g. "gzip", "zstd", "bytes").
Implements ZarrNET.IZarrCodec.