Blosc (as of Version 1.0.0) has the following 16 byte header that stores information about the compressed chunk:
|-0-|-1-|-2-|-3-|-4-|-5-|-6-|-7-|-8-|-9-|-A-|-B-|-C-|-D-|-E-|-F-| ^ ^ ^ ^ | nbytes | blocksize | cbytes | | | | | | | | +--typesize | | +------flags | +----------versionlz +--------------version
In addition, starting in Blosc 2.0.0, there is an extension of the header above that allows to encode the filter pipeline:
1+|-0-|-1-|-2-|-3-|-4-|-5-|-6-|-7-|-8-|-9-|-A-|-B-|-C-|-D-|-E-|-F-| | filter codes | reserved | filter meta | reserved |
So there is a complete byte for encoding the filter and another one to encode possible metadata associated with the filter. The filter pipeline has 5 reserved slots for the filters to be applied sequentially to the chunk. The filters are applied sequentially following the slot order.
All entries are little endian.
version: | ( |
||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
versionlz: | ( |
||||||||||||||||||||||||||||||||
flags and compressor enumeration: | (
The last three bits form an enumeration that allows to use alternative compressors.
|
||||||||||||||||||||||||||||||||
typesize: | ( |
||||||||||||||||||||||||||||||||
nbytes: | ( |
||||||||||||||||||||||||||||||||
blocksize: | ( |
||||||||||||||||||||||||||||||||
cbytes: | ( |