Crate blosc2

Source
Expand description

Blosc2 Rust bindings.

Modules§

schunk
blosc2_schunk,blosc2_storage, and Chunk APIs

Structs§

Blosc2Guard
Singleton struct for initializing blosc2 and auto destroying it when going out of scope. Note: if you create more than one of these, the last one dropped will cause a call to blosc2_destroy
CParams
Wrapper to blosc2_cparams.
Compression parameters.
CompressedBufferInfo
Info about a compressed buffer Normal construction via CompressedBufferInfo::try_from(&[u8])?
Context
Wrapper to blosc2_context.
Container struct for de/compression ops requiring context when used in multithreaded environments
DParams
Wrapper to blosc2_dparams.
Decompression parameters, normally constructed via DParams::default().

Enums§

Blosc2Error
Possible errors arising from Blosc2 library
CLevel
Possible CLevel settings
Codec
Possible compression codecs
Error
Filter
Possible Filters

Constants§

BLOSC2_MAX_DIM
BLOSC2_VERSION_DATE
BLOSC2_VERSION_MAJOR
BLOSC2_VERSION_MINOR
BLOSC2_VERSION_RELEASE
BLOSC2_VERSION_STRING
BUFSIZE
Default buffer size for intermediate de/compression results when required

Functions§

compress
compress_ctx
Context interface to compression, does not require call to init/destroy. For use in multithreaded applications
compress_into
compress_into_ctx
decompress
decompress_ctx
decompress_into
decompress_into_ctx
destroy
Call at end of using blosc2 library, unless you’ve never called blosc2_init This is a safe wrapper to blosc2_destroy where a global Arc<Mutex<bool>> is used to track if blosc2 has already been destroyed. For fine grained control use init_unsafe / destroy_unsafe
destroy_unsafe
Call at end of using blosc2 library, unless you’ve never called blosc2_init For a safe interface managing the singleton nature of this call, use init/destroy functions.
free_resources
Free possible memory temporaries and thread resources. Use this when you are not going to use Blosc for a long while. A 0 if succeeds, in case of problems releasing the resources, it returns a negative number.
get_complib_info
Get the version for a given Codec.
get_nthreads
get_version_string
Get the Blosc2 version string
getitems
Retrieve a number of elements from a Chunk
init
Call before using blosc2, unless using specific ctx de/compression variants This is a safe wrapper to blosc2_init where a global Arc<Mutex<bool>> is used to track if blosc2 has already been initialized. For fine grained control use init_unsafe / destroy_unsafe
init_unsafe
Call before using blosc2, unless using specific ctx de/compression variants For a safe interface managing the singleton nature of this call, use init/destroy functions.
len
Get the number of elements T in the compressed chunk
list_compressors
Get a list of supported compressors in this build
max_compress_len
Return the max size a compressed buffer needs to be to hold src
max_compress_len_bytes
set_compressor
set_nthreads

Type Aliases§

Result
Result type used in this library