Crate blosc2_src
source ·Expand description
This crate is for building c-blosc
and linking to the static build.
Structs
- @brief The parameters for creating a context for compression purposes.
- @brief The parameters for creating a context for decompression purposes.
- @brief The parameters for a user-defined filter.
- @brief This struct is meant to store metadata information inside a #blosc2_schunk, allowing to specify, for example, how to interpret the contents included in the schunk.
- @brief The parameters for a postfilter function.
- @brief The parameters for a prefilter function.
- @brief This struct is the standard container for Blosc 2 compressed data.
- @brief This struct is meant for holding storage parameters for a for a blosc2 container, allowing to specify, for example, how to interpret the contents included in the schunk.
Enums
Constants
- !< data is in big-endian ordering
- !< (int32) size of internal blocks
- !< flags specific for Blosc2 functionality
- !< (int32) compressed size of the buffer (including this header)
- !< the codecs for the filter pipeline (1 byte per code)
- !< meta info for the filter pipeline (1 byte per code)
- !< flags and codec info
- !< (int32) uncompressed size of the buffer (this header is not included)
- !< (uint8) the number of bytes of the atomic type
- !< the version for the chunk format
- !< the version for the format of internal codec
- Defaults mirror BLOSC2_CPARAMS_DEFAULTS in blosc2.h
- Defaults mirror BLOSC2_DPARAMS_DEFAULTS in blosc2.h
- !< Sizes larger than 2gb not supported
- !< Chunk append failure
- !< Chunk insert failure
- !< Chunk update failure
- !< Codec dictionary error
- !< Invalid parameter supplied to codec
- !< Codec not supported
- !< File open failure
- !< File read failure
- !< Remove file failure
- !< File truncate failure
- !< File write failure
- !< Filter pipeline error
- !< Special frame failure
- !< Wrong type for frame
- !< Invalid value in header
- !< Invalid index
- !< Invalid parameter supplied to function
- !< Max buffer size exceeded
- !< Metalayer has not been found
- !< Not found
- !< Pointer is null
- !< IO plugin error
- !< Postfilter failure
- !< Not enough space to read
- !< Bad run length encoding
- !< Super-chunk copy failure
- !< Special super-chunk failure
- !< Thread or thread context creation failure
- !< Tuner failure
- !< Version not supported
- !< Not enough space to write
- !< codec is instrumented (mainly for development)
- !< maximum size for blocks
- !< maximum size for compression dicts
- !< no special value
- !< last valid ID for special value (update this adequately)
- !< special value mask (prev IDs cannot be larger than this)
- !< NaN special value
- !< non initialized values
- !< generic special value
- !< zero special value
- !< use dictionaries with codec
- !< Bit-wise shuffle.
- !< Delta filter.
- !< bit-wise shuffle
- !< delta coding
- !< byte-wise shuffle
- !< sentinel
- !< plain copy
- !< No filter.
- !< No shuffle (for compatibility with Blosc1).
- !< compressor library in super-chunk header
- !< Byte-wise shuffle.
- !< Truncate mantissa precision; positive values in cparams.filters_meta will keep bits; negative values will reduce bits.
Statics
- @brief Default struct for #blosc2_storage meant for user initialization.
Functions
- @brief Get information about a compressed buffer, namely the type size (@p typesize), as well as some internal @p flags.
- @brief Get information about a compressed buffer, namely the number of uncompressed bytes (@p nbytes) and compressed (@p cbytes). It also returns the @p blocksize (which is used internally for doing the compression by blocks).
- @brief Checks that the compressed buffer starting at @p cbuffer of length @p cbytes may contain valid blosc compressed data, and that it is safe to call blosc1_decompress/blosc1_getitem. On success, returns 0 and sets @p nbytes to the size of the uncompressed data. This does not guarantee that the decompression function won’t return an error, but does guarantee that it is safe to attempt decompression.
- @brief Compress a block of data in the @p src buffer and returns the size of compressed block.
- @brief Decompress a block of compressed data in @p src, put the result in @p dest and returns the size of the decompressed block.
- @brief Get the internal blocksize to be used during compression. 0 means that an automatic blocksize is computed internally.
- @brief Get the current compressor that is used for compression.
- @brief Get @p nitems (of @p typesize size) in @p src buffer starting in @p start. The items are returned in @p dest buffer, which has to have enough space for storing all items.
- @brief Force the use of a specific blocksize. If 0, an automatic blocksize will be used (the default).
- @brief Select the compressor to be used. The supported ones are “blosclz”, “lz4”, “lz4hc”, “zlib” and “ztsd”. If this function is not called, then “blosclz” will be used.
- @brief Set the split mode.
- @brief Get the compressor library/format used in a compressed buffer.
- @brief Get information about a compressed buffer, namely the number of uncompressed bytes (@p nbytes) and compressed (@p cbytes). It also returns the @p blocksize (which is used internally for doing the compression by blocks).
- @brief Get information about a compressed buffer, namely the internal Blosc format version (@p version) and the format for the internal Lempel-Ziv compressor used (@p versionlz).
- @brief Create a chunk made of nans.
- @brief Create a chunk made of repeated values.
- @brief Create a chunk made of uninitialized values.
- @brief Create a chunk made of zeros.
- @brief Get the compressor name associated with the compressor code.
- @brief Get the compressor code associated with the compressor name.
- @brief Context interface to Blosc compression. This does not require a call to #blosc2_init and can be called from multithreaded applications without the global lock being used, so allowing Blosc be executed simultaneously in those scenarios.
- @brief Create a context for @a *_ctx() compression functions.
- @brief Create a context for *_ctx() decompression functions.
- @brief Create a @p cparams associated to a context.
- @brief Create a @p dparams associated to a context.
- @brief Decompress a block of compressed data in @p src, put the result in @p dest and returns the size of the decompressed block.
- @brief Context interface to Blosc decompression. This does not require a call to #blosc2_init and can be called from multithreaded applications without the global lock being used, so allowing Blosc be executed simultaneously in those scenarios.
- @brief Destroy the Blosc library environment.
- @brief Get the offsets of a frame in a super-chunk.
- @brief Free the resources associated with a context.
- @brief Free possible memory temporaries and thread resources. Use this when you are not going to use Blosc for a long while.
- @brief Get info from compression libraries included in the current build.
- @brief Returns the current number of threads that are used for compression/decompression.
- @brief Get the version of Blosc in string format.
- @brief Get @p nitems (of @p typesize size) in @p src buffer starting in @p start. The items are returned in @p dest buffer. The dest buffer should have enough space for storing all items. This function is a more secure version of #blosc1_getitem.
- @brief Context interface counterpart for #blosc1_getitem.
- @brief Initialize the Blosc library environment.
- @brief Get a list of compressors supported in the current build.
- @brief Add content into a new metalayer.
- @brief Update the content of an existing metalayer.
- @brief Register locally a user-defined codec in Blosc.
- @brief Register locally a user-defined filter in Blosc.
- @brief Register a user-defined input/output callbacks in Blosc.
- @brief Append a @p src data buffer to a super-chunk.
- @brief Append an existing @p chunk to a super-chunk.
- @brief Set the private
avoid_cframe_free
field in a frame. - Create a copy of a super-chunk.
- @brief Decompress and return the @p nchunk chunk of a super-chunk.
- @brief Delete a chunk at a specific position in a super-chunk.
- @brief Quickly fill an empty frame with special values (zeros, NaNs, uninit).
- @brief Get the length (in bytes) of the internal frame of the super-chunk.
- @brief Release resources from a super-chunk.
- @brief Create a super-chunk out of a contiguous frame buffer.
- @brief Return a compressed chunk that is part of a super-chunk in the @p chunk parameter.
- @brief Return the @p cparams associated to a super-chunk.
- @brief Return the @p dparams struct associated to a super-chunk.
- @brief Return a (lazy) compressed chunk that is part of a super-chunk in the @p chunk parameter.
- @brief Fill buffer with a schunk slice.
- @brief Insert a chunk at a specific position in a super-chunk.
- @brief Create a new super-chunk.
- @brief Open an existing super-chunk that is on-disk (frame). No in-memory copy is made.
- @brief Open an existing super-chunk that is on-disk (frame). No in-memory copy is made.
- @brief Open an existing super-chunk (no copy is made) using a user-defined I/O interface.
- @brief Reorder the chunk offsets of an existing super-chunk.
- @brief Update a schunk slice from buffer.
- @brief Update a chunk at a specific position in a super-chunk.
- @brief Select the delta coding filter to be used.
- @brief Set a maskout so as to avoid decompressing specified blocks.
- @brief Initialize a pool of threads for compression/decompression. If @p nthreads is 1, then the serial version is chosen and a possible previous existing pool is ended. If this is not called, @p nthreads is set to 1 internally.
- Set the threading backend for parallel compression/decompression to use
callback
to execute work instead of using the Blosc-managed threads. This function is not thread-safe and should be called before any other Blosc function: it affects all Blosc contexts. PassingNULL
uses the default Blosc threading backend. Thecallback_data
argument is passed through to the callback. - @brief Add content into a new variable-length metalayer.
- @brief Delete the variable-length metalayer from the super-chunk.
- @brief Find whether the schunk has a variable-length metalayer or not.
- @brief Get the content out of a variable-length metalayer.
- @brief Get a list of all the variable-length metalayer names.
- @brief Update the content of an existing variable-length metalayer.
Type Aliases
- @brief Codes for the different tuners shipped with Blosc
- @brief Codes for filters.
- @brief Codes for internal flags (see blosc1_cbuffer_metainfo)
- @brief Codes for new internal flags in Blosc2
- @brief Values for different Blosc2 capabilities
- @brief Codes for the different compressors shipped with Blosc
- @brief Codes for compression libraries shipped with Blosc (code must be < 8)
- @brief The codes for compressor formats shipped with Blosc
- @brief The version formats for compressors shipped with Blosc. All versions here starts at 1
- @brief Offsets for fields in Blosc2 chunk header.
- @brief Run lengths for special values for chunks/frames
- @brief Error codes Each time an error code is added here, its corresponding message error should be added in print_error()
- Structures and functions related with user-defined input/output.
- Structures and functions related with compression codecs.
- Structures and functions related with contexts.
- Structures and functions related with filters plugins.
- @brief The type of the postfilter function.
- @brief The type of the prefilter function.
- Pointer to a callback function that executes
dojob(jobdata + i*jobdata_elsize)
fori = 0 to numjobs-1
, possibly in parallel threads (but not returning until alldojob
calls have returned). This allows the caller to provide a custom threading backend as an alternative to the default Blosc-managed threads.callback_data
is passed through fromblosc2_set_threads_callback
.