Plugins#

Filters#

typedef int (*blosc2_filter_forward_cb)(const uint8_t*, uint8_t*, int32_t, uint8_t, blosc2_cparams*)#
typedef int (*blosc2_filter_backward_cb)(const uint8_t*, uint8_t*, int32_t, uint8_t, blosc2_dparams*)#
struct blosc2_filter#

The parameters for a user-defined filter.

Public Members

uint8_t id#

The filter identifier.

blosc2_filter_forward_cb forward#

The filter function that is used during compression.

blosc2_filter_backward_cb backward#

The filter function that is used during decompression.

int blosc2_register_filter(blosc2_filter *filter)#

Register locally a user-defined filter in Blosc.

Parameters:
  • filter – The filter to register.

Returns:

0 if succeeds. Else a negative code is returned.

Codecs#

typedef int (*blosc2_codec_encoder_cb)(const uint8_t *input, int32_t input_len, uint8_t *output, int32_t output_len, uint8_t meta, blosc2_cparams *cparams, const void *chunk)#
typedef int (*blosc2_codec_decoder_cb)(const uint8_t *input, int32_t input_len, uint8_t *output, int32_t output_len, uint8_t meta, blosc2_dparams *dparams, const void *chunk)#
struct blosc2_codec#

Public Members

uint8_t compcode#

The codec identifier.

char *compname#

The codec name.

uint8_t complib#

The codec library format.

uint8_t compver#

The codec version.

blosc2_codec_encoder_cb encoder#

The codec encoder that is used during compression.

blosc2_codec_decoder_cb decoder#

The codec decoder that is used during decompression.

int blosc2_register_codec(blosc2_codec *codec)#

Register locally a user-defined codec in Blosc.

Parameters:
  • codec – The codec to register.

Returns:

0 if succeeds. Else a negative code is returned.

IO backends#

typedef void *(*blosc2_open_cb)(const char *urlpath, const char *mode, void *params)#
typedef int (*blosc2_close_cb)(void *stream)#
typedef int64_t (*blosc2_tell_cb)(void *stream)#
typedef int (*blosc2_seek_cb)(void *stream, int64_t offset, int whence)#
typedef int64_t (*blosc2_write_cb)(const void *ptr, int64_t size, int64_t nitems, void *stream)#
typedef int64_t (*blosc2_read_cb)(void *ptr, int64_t size, int64_t nitems, void *stream)#
typedef int (*blosc2_truncate_cb)(void *stream, int64_t size)#
struct blosc2_io_cb#

Public Members

uint8_t id#

The IO identifier.

blosc2_open_cb open#

The IO open callback.

blosc2_close_cb close#

The IO close callback.

blosc2_tell_cb tell#

The IO tell callback.

blosc2_seek_cb seek#

The IO seek callback.

blosc2_write_cb write#

The IO write callback.

blosc2_read_cb read#

The IO read callback.

blosc2_truncate_cb truncate#

The IO truncate callback.

struct blosc2_io#

Public Members

uint8_t id#

The IO identifier.

void *params#

The IO parameters.

int blosc2_register_io_cb(const blosc2_io_cb *io)#

Register a user-defined input/output callbacks in Blosc.

Parameters:
  • io – The callbacks API to register.

Returns:

0 if succeeds. Else a negative code is returned.