Skip to main content
`Ctrl`+`K`

# C-Blosc2 API

This section contains the C-Blosc2 public API and the structures needed to use it. C-Blosc2 tries to be backward compatible with both the C-Blosc1 API and format. Furthermore, if you just use the C-Blosc1 API you are guaranteed to generate compressed data containers that can be read with a Blosc1 library.

Having said that, the C-Blosc2 API gives you much more functionality, like 64-bit data containers, more filters, more support for vector instructions, support for accelerated versions of some codecs in Intel’s IPP (like LZ4), the ability to work with data either in-memory or on-disk (frames) or attach metainfo to your datasets (metalayers).

Contents:

- Utility variables
  - Limits for different features
  - Codes for filters
  - Compressor codecs
  - Compressor names
  - Internal flags (blosc1_cbuffer_metainfo)
- Utility functions
  - Timing functions
  - File and directory utilities
  - Slice utilities
- Blosc1 API
  - Main API
  - Compressed buffer information
  - Utility functions
- Context
  - `blosc2_dparams`
  - `BLOSC2_DPARAMS_DEFAULTS`
  - `blosc2_create_cctx()`
  - `blosc2_create_dctx()`
  - `blosc2_free_ctx()`
  - `blosc2_compress_ctx()`
  - `blosc2_decompress_ctx()`
  - `blosc2_set_maskout()`
  - `blosc2_getitem_ctx()`
  - `blosc2_ctx_get_cparams()`
  - `blosc2_ctx_get_dparams()`
- Plugins
  - Filters
  - Codecs
  - Tuners
  - IO backends
- Super-chunk
  - `blosc2_storage`
  - `blosc2_schunk`
  - `blosc2_schunk_new()`
  - `blosc2_schunk_free()`
  - `blosc2_schunk_open()`
  - `blosc2_schunk_open_offset()`
  - `blosc2_schunk_open_udio()`
  - `blosc2_schunk_copy()`
  - `blosc2_schunk_from_buffer()`
  - `blosc2_schunk_to_buffer()`
  - `blosc2_schunk_to_file()`
  - `blosc2_schunk_append_file()`
  - `blosc2_schunk_get_cparams()`
  - `blosc2_schunk_get_dparams()`
  - `blosc2_schunk_reorder_offsets()`
  - `blosc2_schunk_frame_len()`
  - `blosc2_schunk_fill_special()`
  - `blosc2_schunk_append_buffer()`
  - `blosc2_schunk_get_slice_buffer()`
  - `blosc2_schunk_set_slice_buffer()`
  - `blosc2_schunk_avoid_cframe_free()`
  - Dealing with chunks
  - Creating chunks
  - Frame specific functions
- Metalayers
  - `blosc2_metalayer`
  - Fixed-length metalayers
  - Variable-length metalayers
- Blosc2 NDim
  - Context
  - Array
  - Utilities