Expand description
Blosc2 Rust bindings.
Modules§
- schunk
blosc2_schunk
,blosc2_storage
, andChunk
APIs
Structs§
- Blosc2
Guard - 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. - Compressed
Buffer Info - 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 viaDParams::default()
.
Enums§
- Blosc2
Error - Possible errors arising from Blosc2 library
- CLevel
- Possible CLevel settings
- Codec
- Possible compression codecs
- Error
- Filter
- Possible Filters
Constants§
- BLOS
C2_ MAX_ DIM - BLOS
C2_ VERSION_ DATE - BLOS
C2_ VERSION_ MAJOR - BLOS
C2_ VERSION_ MINOR - BLOS
C2_ VERSION_ RELEASE - BLOS
C2_ 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 toblosc2_destroy
where a globalArc<Mutex<bool>>
is used to track if blosc2 has already been destroyed. For fine grained control useinit_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, useinit
/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 globalArc<Mutex<bool>>
is used to track if blosc2 has already been initialized. For fine grained control useinit_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