Crate blosc_src

source ·
Expand description

This crate is for building c-blosc and linking to the static build.

Constants§

Functions§

  • Return the compressor library/format used in a compressed buffer.
  • Return meta-information about a compressed buffer, namely the type size (typesize), as well as some internal flags.
  • 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).
  • Checks that the compressed buffer starting at cbuffer of length cbytes may contain valid blosc compressed data, and that it is safe to call blosc_decompress/blosc_decompress_ctx/blosc_getitem.
  • Return information about a compressed buffer, namely the internal Blosc format version (version) and the format for the internal compressor used (compversion).
  • Get the compname associated with the compcode.
  • Return the compressor code associated with the compressor name.
  • 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).
  • 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.
  • Decompress a block of compressed data in src, put the result in dest and returns the size of the decompressed block.
  • 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.
  • Destroy the Blosc library environment.
  • 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.
  • Get the internal blocksize to be used during compression. 0 means that an automatic blocksize is computed internally (the default).
  • Get info from compression libraries included in the current build. In compname you pass the compressor name that you want info from.
  • Returns the current compressor that is being used for compression.
  • Returns the current number of threads that are used for compression/decompression.
  • Return the version of the C-Blosc library in string format.
  • 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.
  • Initialize the Blosc library environment.
  • 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.
  • Force the use of a specific blocksize. If 0, an automatic blocksize will be used (the default).
  • 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.
  • 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.
  • Set the split mode.