Expand description
Rust FFI bindings for the C-Blosc block-oriented compression library
These are raw, unsafe
FFI bindings. Here be dragons! You probably
shouldn’t use this crate directly. Instead, you should use the
blosc
crate.
Constants§
- BLOSCLZ_
VERSION_ STRING - BLOSC_
ALWAYS_ SPLIT - BLOSC_
AUTO_ SPLIT - BLOSC_
BITSHUFFLE - BLOSC_
BLOSCLZ - BLOSC_
BLOSCLZ_ COMPNAME - BLOSC_
BLOSCLZ_ FORMAT - BLOSC_
BLOSCLZ_ LIB - BLOSC_
BLOSCLZ_ LIBNAME - BLOSC_
BLOSCLZ_ VERSION_ FORMAT - BLOSC_
DOBITSHUFFLE - BLOSC_
DOSHUFFLE - BLOSC_
FORWARD_ COMPAT_ SPLIT - BLOSC_
LZ4 - BLOSC_
LZ4HC - BLOSC_
LZ4HC_ COMPNAME - BLOSC_
LZ4HC_ FORMAT - BLOSC_
LZ4HC_ VERSION_ FORMAT - BLOSC_
LZ4_ COMPNAME - BLOSC_
LZ4_ FORMAT - BLOSC_
LZ4_ LIB - BLOSC_
LZ4_ LIBNAME - BLOSC_
LZ4_ VERSION_ FORMAT - BLOSC_
MAX_ BUFFERSIZE - BLOSC_
MAX_ OVERHEAD - BLOSC_
MAX_ THREADS - BLOSC_
MAX_ TYPESIZE - BLOSC_
MEMCPYED - BLOSC_
MIN_ HEADER_ LENGTH - BLOSC_
NEVER_ SPLIT - BLOSC_
NOSHUFFLE - BLOSC_
SHUFFLE - BLOSC_
SNAPPY - BLOSC_
SNAPPY_ COMPNAME - BLOSC_
SNAPPY_ FORMAT - BLOSC_
SNAPPY_ LIB - BLOSC_
SNAPPY_ LIBNAME - BLOSC_
SNAPPY_ VERSION_ FORMAT - BLOSC_
VERSION_ DATE - BLOSC_
VERSION_ FORMAT - BLOSC_
VERSION_ MAJOR - BLOSC_
VERSION_ MINOR - BLOSC_
VERSION_ RELEASE - BLOSC_
VERSION_ REVISION - BLOSC_
VERSION_ STRING - BLOSC_
ZLIB - BLOSC_
ZLIB_ COMPNAME - BLOSC_
ZLIB_ FORMAT - BLOSC_
ZLIB_ LIB - BLOSC_
ZLIB_ LIBNAME - BLOSC_
ZLIB_ VERSION_ FORMAT - BLOSC_
ZSTD - BLOSC_
ZSTD_ COMPNAME - BLOSC_
ZSTD_ FORMAT - BLOSC_
ZSTD_ LIB - BLOSC_
ZSTD_ LIBNAME - BLOSC_
ZSTD_ VERSION_ FORMAT
Functions§
- blosc_
cbuffer_ ⚠complib - Return the compressor library/format used in a compressed buffer.
- blosc_
cbuffer_ ⚠metainfo - Return meta-information about a compressed buffer, namely the type size
(
typesize
), as well as some internalflags
. - blosc_
cbuffer_ ⚠sizes - Return information about a compressed buffer, namely the number of
uncompressed bytes (
nbytes
) and compressed (cbytes
). It also returns theblocksize
(which is used internally for doing the compression by blocks). - blosc_
cbuffer_ ⚠validate - Checks that the compressed buffer starting at
cbuffer
of lengthcbytes
may contain valid blosc compressed data, and that it is safe to call blosc_decompress/blosc_decompress_ctx/blosc_getitem. - blosc_
cbuffer_ ⚠versions - Return information about a compressed buffer, namely the internal
Blosc format version (
version
) and the format for the internal compressor used (compversion
). - blosc_
compcode_ ⚠to_ compname - Get the
compname
associated with thecompcode
. - blosc_
compname_ ⚠to_ compcode - Return the compressor code associated with the compressor name.
- blosc_
compress ⚠ - Compress a block of data in the
src
buffer and returns the size of the compressed block. The size ofsrc
buffer is specified bynbytes
. There is not a minimum forsrc
buffer size (nbytes
). - blosc_
compress_ ⚠ctx - Context interface to blosc compression. This does not require a call to blosc_init() and can be called from multithreaded applications without the global lock being used, so allowing Blosc be executed simultaneously in those scenarios.
- blosc_
decompress ⚠ - Decompress a block of compressed data in
src
, put the result indest
and returns the size of the decompressed block. - blosc_
decompress_ ⚠ctx - Context interface to blosc decompression. This does not require a call to blosc_init() and can be called from multithreaded applications without the global lock being used, so allowing Blosc be executed simultaneously in those scenarios.
- blosc_
destroy ⚠ - Destroy the Blosc library environment.
- blosc_
free_ ⚠resources - Free possible memory temporaries and thread resources. Use this when you are not going to use Blosc for a long while. In case of problems releasing the resources, it returns a negative number, else it returns 0.
- blosc_
get_ ⚠blocksize - Get the internal blocksize to be used during compression. 0 means that an automatic blocksize is computed internally (the default).
- blosc_
get_ ⚠complib_ info - Get info from compression libraries included in the current build.
In
compname
you pass the compressor name that you want info from. - blosc_
get_ ⚠compressor - Returns the current compressor that is being used for compression.
- blosc_
get_ ⚠nthreads - Returns the current number of threads that are used for compression/decompression.
- blosc_
get_ ⚠version_ string - Return the version of the C-Blosc library in string format.
- blosc_
getitem ⚠ - Get
nitems
(of typesize size) insrc
buffer starting instart
. The items are returned indest
buffer, which has to have enough space for storing all items. - blosc_
init ⚠ - Initialize the Blosc library environment.
- blosc_
list_ ⚠compressors - Get a list of compressors supported in the current build. The returned value is a string with a concatenation of “blosclz”, “lz4”, “lz4hc”, “snappy”, “zlib” or “zstd “separated by commas, depending on which ones are present in the build.
- blosc_
set_ ⚠blocksize - Force the use of a specific blocksize. If 0, an automatic blocksize will be used (the default).
- blosc_
set_ ⚠compressor - Select the compressor to be used. The supported ones are “blosclz”, “lz4”, “lz4hc”, “snappy”, “zlib” and “zstd”. If this function is not called, then “blosclz” will be used by default.
- blosc_
set_ ⚠nthreads - Initialize a pool of threads for compression/decompression. If
nthreads
is 1, then the serial version is chosen and a possible previous existing pool is ended. If this is not called,nthreads
is set to 1 internally. - blosc_
set_ ⚠splitmode - Set the split mode.