Crate blosc_sys[][src]

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 internal flags.

blosc_cbuffer_sizes

Return information about a compressed buffer, namely the number of uncompressed bytes (nbytes) and compressed (cbytes). It also returns the blocksize (which is used internally for doing the compression by blocks).

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 the compcode.

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 of src buffer is specified by nbytes. There is not a minimum for src 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 in dest 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) in src buffer starting in start. The items are returned in dest 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 "ztsd". 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.