Crate blosc2_src

Source
Expand description

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

Structs§

blosc2_codec
blosc2_context_s
blosc2_cparams
@brief The parameters for creating a context for compression purposes.
blosc2_dparams
@brief The parameters for creating a context for decompression purposes.
blosc2_filter
@brief The parameters for a user-defined filter.
blosc2_frame_s
blosc2_instr
blosc2_io
blosc2_io_cb
blosc2_metalayer
@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.
blosc2_postfilter_params
@brief The parameters for a postfilter function.
blosc2_prefilter_params
@brief The parameters for a prefilter function.
blosc2_schunk
@brief This struct is the standard container for Blosc 2 compressed data.
blosc2_stdio_file
blosc2_storage
@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.
blosc2_tuner
timespec

Enums§

FILE

Constants§

BLOSC1_VERSION_FORMAT
BLOSC1_VERSION_FORMAT_PRE1
BLOSC2_BIGENDIAN
!< data is in big-endian ordering
BLOSC2_CHUNK_BLOCKSIZE
!< (int32) size of internal blocks
BLOSC2_CHUNK_BLOSC2_FLAGS
!< flags specific for Blosc2 functionality
BLOSC2_CHUNK_CBYTES
!< (int32) compressed size of the buffer (including this header)
BLOSC2_CHUNK_FILTER_CODES
!< the codecs for the filter pipeline (1 byte per code)
BLOSC2_CHUNK_FILTER_META
!< meta info for the filter pipeline (1 byte per code)
BLOSC2_CHUNK_FLAGS
!< flags and codec info
BLOSC2_CHUNK_NBYTES
!< (int32) uncompressed size of the buffer (this header is not included)
BLOSC2_CHUNK_TYPESIZE
!< (uint8) the number of bytes of the atomic type
BLOSC2_CHUNK_VERSION
!< the version for the chunk format
BLOSC2_CHUNK_VERSIONLZ
!< the version for the format of internal codec
BLOSC2_CPARAMS_DEFAULTS
Defaults mirror BLOSC2_CPARAMS_DEFAULTS in blosc2.h
BLOSC2_DEFINED_CODECS_START
BLOSC2_DEFINED_CODECS_STOP
BLOSC2_DEFINED_FILTERS_START
BLOSC2_DEFINED_FILTERS_STOP
BLOSC2_DEFINED_TUNER_START
BLOSC2_DEFINED_TUNER_STOP
BLOSC2_DPARAMS_DEFAULTS
Defaults mirror BLOSC2_DPARAMS_DEFAULTS in blosc2.h
BLOSC2_ERROR_2GB_LIMIT
!< Sizes larger than 2gb not supported
BLOSC2_ERROR_CHUNK_APPEND
!< Chunk append failure
BLOSC2_ERROR_CHUNK_INSERT
!< Chunk insert failure
BLOSC2_ERROR_CHUNK_UPDATE
!< Chunk update failure
BLOSC2_ERROR_CODEC_DICT
!< Codec dictionary error
BLOSC2_ERROR_CODEC_PARAM
!< Invalid parameter supplied to codec
BLOSC2_ERROR_CODEC_SUPPORT
!< Codec not supported
BLOSC2_ERROR_DATA
BLOSC2_ERROR_FAILURE
BLOSC2_ERROR_FILE_OPEN
!< File open failure
BLOSC2_ERROR_FILE_READ
!< File read failure
BLOSC2_ERROR_FILE_REMOVE
!< Remove file failure
BLOSC2_ERROR_FILE_TRUNCATE
!< File truncate failure
BLOSC2_ERROR_FILE_WRITE
!< File write failure
BLOSC2_ERROR_FILTER_PIPELINE
!< Filter pipeline error
BLOSC2_ERROR_FRAME_SPECIAL
!< Special frame failure
BLOSC2_ERROR_FRAME_TYPE
!< Wrong type for frame
BLOSC2_ERROR_INVALID_HEADER
!< Invalid value in header
BLOSC2_ERROR_INVALID_INDEX
!< Invalid index
BLOSC2_ERROR_INVALID_PARAM
!< Invalid parameter supplied to function
BLOSC2_ERROR_MAX_BUFSIZE_EXCEEDED
!< Max buffer size exceeded
BLOSC2_ERROR_MEMORY_ALLOC
BLOSC2_ERROR_METALAYER_NOT_FOUND
!< Metalayer has not been found
BLOSC2_ERROR_NOT_FOUND
!< Not found
BLOSC2_ERROR_NULL_POINTER
!< Pointer is null
BLOSC2_ERROR_PLUGIN_IO
!< IO plugin error
BLOSC2_ERROR_POSTFILTER
!< Postfilter failure
BLOSC2_ERROR_READ_BUFFER
!< Not enough space to read
BLOSC2_ERROR_RUN_LENGTH
!< Bad run length encoding
BLOSC2_ERROR_SCHUNK_COPY
!< Super-chunk copy failure
BLOSC2_ERROR_SCHUNK_SPECIAL
!< Special super-chunk failure
BLOSC2_ERROR_STREAM
BLOSC2_ERROR_SUCCESS
BLOSC2_ERROR_THREAD_CREATE
!< Thread or thread context creation failure
BLOSC2_ERROR_TUNER
!< Tuner failure
BLOSC2_ERROR_VERSION_SUPPORT
!< Version not supported
BLOSC2_ERROR_WRITE_BUFFER
!< Not enough space to write
BLOSC2_GLOBAL_REGISTERED_CODECS
BLOSC2_GLOBAL_REGISTERED_CODECS_START
BLOSC2_GLOBAL_REGISTERED_CODECS_STOP
BLOSC2_GLOBAL_REGISTERED_FILTERS
BLOSC2_GLOBAL_REGISTERED_FILTERS_START
BLOSC2_GLOBAL_REGISTERED_FILTERS_STOP
BLOSC2_GLOBAL_REGISTERED_TUNERS
BLOSC2_GLOBAL_REGISTERED_TUNER_START
BLOSC2_GLOBAL_REGISTERED_TUNER_STOP
BLOSC2_INSTR_CODEC
!< codec is instrumented (mainly for development)
BLOSC2_IO_BLOSC_DEFINED
BLOSC2_IO_FILESYSTEM
BLOSC2_IO_REGISTERED
BLOSC2_IO_USER_DEFINED
BLOSC2_MAXBLOCKSIZE
!< maximum size for blocks
BLOSC2_MAXDICTSIZE
!< maximum size for compression dicts
BLOSC2_MAX_BUFFERSIZE
BLOSC2_MAX_DIM
BLOSC2_MAX_FILTERS
BLOSC2_MAX_METALAYERS
BLOSC2_MAX_OVERHEAD
BLOSC2_MAX_UDFILTERS
BLOSC2_MAX_VLMETALAYERS
BLOSC2_METALAYER_NAME_MAXLEN
BLOSC2_NO_SPECIAL
!< no special value
BLOSC2_SPECIAL_LASTID
!< last valid ID for special value (update this adequately)
BLOSC2_SPECIAL_MASK
!< special value mask (prev IDs cannot be larger than this)
BLOSC2_SPECIAL_NAN
!< NaN special value
BLOSC2_SPECIAL_UNINIT
!< non initialized values
BLOSC2_SPECIAL_VALUE
!< generic special value
BLOSC2_SPECIAL_ZERO
!< zero special value
BLOSC2_USEDICT
!< use dictionaries with codec
BLOSC2_USER_REGISTERED_CODECS_START
BLOSC2_USER_REGISTERED_CODECS_STOP
BLOSC2_USER_REGISTERED_FILTERS_START
BLOSC2_USER_REGISTERED_FILTERS_STOP
BLOSC2_USER_REGISTERED_TUNER_START
BLOSC2_USER_REGISTERED_TUNER_STOP
BLOSC2_VERSION_DATE
BLOSC2_VERSION_FORMAT
BLOSC2_VERSION_FORMAT_ALPHA
BLOSC2_VERSION_FORMAT_BETA1
BLOSC2_VERSION_FORMAT_STABLE
BLOSC2_VERSION_FRAME_FORMAT
BLOSC2_VERSION_FRAME_FORMAT_BETA2
BLOSC2_VERSION_FRAME_FORMAT_RC1
BLOSC2_VERSION_MAJOR
BLOSC2_VERSION_MINOR
BLOSC2_VERSION_RELEASE
BLOSC2_VERSION_STRING
BLOSC2_VLMETALAYERS_NAME_MAXLEN
BLOSC_ALWAYS_SPLIT
BLOSC_AUTO_SPLIT
BLOSC_BITSHUFFLE
!< Bit-wise shuffle.
BLOSC_BLOSCLZ
BLOSC_BLOSCLZ_COMPNAME
BLOSC_BLOSCLZ_FORMAT
BLOSC_BLOSCLZ_LIB
BLOSC_BLOSCLZ_LIBNAME
BLOSC_BLOSCLZ_VERSION_FORMAT
BLOSC_DELTA
!< Delta filter.
BLOSC_DOBITSHUFFLE
!< bit-wise shuffle
BLOSC_DODELTA
!< delta coding
BLOSC_DOSHUFFLE
!< byte-wise shuffle
BLOSC_EXTENDED_HEADER_LENGTH
BLOSC_FORWARD_COMPAT_SPLIT
BLOSC_IO_LAST_BLOSC_DEFINED
BLOSC_IO_LAST_REGISTERED
BLOSC_LAST_CODEC
BLOSC_LAST_FILTER
!< sentinel
BLOSC_LAST_REGISTERED_CODEC
BLOSC_LAST_REGISTERED_FILTER
BLOSC_LAST_REGISTERED_TUNE
BLOSC_LAST_TUNER
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_TYPESIZE
BLOSC_MEMCPYED
!< plain copy
BLOSC_MIN_BUFFERSIZE
BLOSC_MIN_HEADER_LENGTH
BLOSC_NEVER_SPLIT
BLOSC_NOFILTER
!< No filter.
BLOSC_NOSHUFFLE
!< No shuffle (for compatibility with Blosc1).
BLOSC_SCHUNK_LIB
!< compressor library in super-chunk header
BLOSC_SHUFFLE
!< Byte-wise shuffle.
BLOSC_STUNE
BLOSC_TRUNC_PREC
!< Truncate mantissa precision; positive values in cparams.filters_meta will keep bits; negative values will reduce bits.
BLOSC_UDCODEC_FORMAT
BLOSC_UDCODEC_LIB
BLOSC_UDCODEC_VERSION_FORMAT
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

Statics§

BLOSC2_IO_DEFAULTS
BLOSC2_STORAGE_DEFAULTS
@brief Default struct for #blosc2_storage meant for user initialization.

Functions§

blosc1_cbuffer_metainfo
@brief Get information about a compressed buffer, namely the type size (@p typesize), as well as some internal @p flags.
blosc1_cbuffer_sizes
@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).
blosc1_cbuffer_validate
@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.
blosc1_compress
@brief Compress a block of data in the @p src buffer and returns the size of compressed block.
blosc1_decompress
@brief Decompress a block of compressed data in @p src, put the result in @p dest and returns the size of the decompressed block.
blosc1_get_blocksize
@brief Get the internal blocksize to be used during compression. 0 means that an automatic blocksize is computed internally.
blosc1_get_compressor
@brief Get the current compressor that is used for compression.
blosc1_getitem
@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.
blosc1_set_blocksize
@brief Force the use of a specific blocksize. If 0, an automatic blocksize will be used (the default).
blosc1_set_compressor
@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.
blosc1_set_splitmode
@brief Set the split mode.
blosc2_cbuffer_complib
@brief Get the compressor library/format used in a compressed buffer.
blosc2_cbuffer_sizes
@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).
blosc2_cbuffer_versions
@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).
blosc2_chunk_nans
@brief Create a chunk made of nans.
blosc2_chunk_repeatval
@brief Create a chunk made of repeated values.
blosc2_chunk_uninit
@brief Create a chunk made of uninitialized values.
blosc2_chunk_zeros
@brief Create a chunk made of zeros.
blosc2_compcode_to_compname
@brief Get the compressor name associated with the compressor code.
blosc2_compname_to_compcode
@brief Get the compressor code associated with the compressor name.
blosc2_compress
blosc2_compress_ctx
@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.
blosc2_create_cctx
@brief Create a context for @a *_ctx() compression functions.
blosc2_create_dctx
@brief Create a context for *_ctx() decompression functions.
blosc2_ctx_get_cparams
@brief Create a @p cparams associated to a context.
blosc2_ctx_get_dparams
@brief Create a @p dparams associated to a context.
blosc2_decompress
@brief Decompress a block of compressed data in @p src, put the result in @p dest and returns the size of the decompressed block.
blosc2_decompress_ctx
@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.
blosc2_destroy
@brief Destroy the Blosc library environment.
blosc2_frame_get_offsets
@brief Get the offsets of a frame in a super-chunk.
blosc2_free_ctx
@brief Free the resources associated with a context.
blosc2_free_resources
@brief Free possible memory temporaries and thread resources. Use this when you are not going to use Blosc for a long while.
blosc2_get_complib_info
@brief Get info from compression libraries included in the current build.
blosc2_get_io_cb
blosc2_get_nthreads
@brief Returns the current number of threads that are used for compression/decompression.
blosc2_get_version_string
@brief Get the version of Blosc in string format.
blosc2_getitem
@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.
blosc2_getitem_ctx
@brief Context interface counterpart for #blosc1_getitem.
blosc2_init
@brief Initialize the Blosc library environment.
blosc2_list_compressors
@brief Get a list of compressors supported in the current build.
blosc2_meta_add
@brief Add content into a new metalayer.
blosc2_meta_update
@brief Update the content of an existing metalayer.
blosc2_multidim_to_unidim
blosc2_register_codec
@brief Register locally a user-defined codec in Blosc.
blosc2_register_filter
@brief Register locally a user-defined filter in Blosc.
blosc2_register_io_cb
@brief Register a user-defined input/output callbacks in Blosc.
blosc2_remove_dir
blosc2_remove_urlpath
blosc2_rename_urlpath
blosc2_schunk_append_buffer
@brief Append a @p src data buffer to a super-chunk.
blosc2_schunk_append_chunk
@brief Append an existing @p chunk to a super-chunk.
blosc2_schunk_append_file
blosc2_schunk_avoid_cframe_free
@brief Set the private avoid_cframe_free field in a frame.
blosc2_schunk_copy
Create a copy of a super-chunk.
blosc2_schunk_decompress_chunk
@brief Decompress and return the @p nchunk chunk of a super-chunk.
blosc2_schunk_delete_chunk
@brief Delete a chunk at a specific position in a super-chunk.
blosc2_schunk_fill_special
@brief Quickly fill an empty frame with special values (zeros, NaNs, uninit).
blosc2_schunk_frame_len
@brief Get the length (in bytes) of the internal frame of the super-chunk.
blosc2_schunk_free
@brief Release resources from a super-chunk.
blosc2_schunk_from_buffer
@brief Create a super-chunk out of a contiguous frame buffer.
blosc2_schunk_get_chunk
@brief Return a compressed chunk that is part of a super-chunk in the @p chunk parameter.
blosc2_schunk_get_cparams
@brief Return the @p cparams associated to a super-chunk.
blosc2_schunk_get_dparams
@brief Return the @p dparams struct associated to a super-chunk.
blosc2_schunk_get_lazychunk
@brief Return a (lazy) compressed chunk that is part of a super-chunk in the @p chunk parameter.
blosc2_schunk_get_slice_buffer
@brief Fill buffer with a schunk slice.
blosc2_schunk_insert_chunk
@brief Insert a chunk at a specific position in a super-chunk.
blosc2_schunk_new
@brief Create a new super-chunk.
blosc2_schunk_open
@brief Open an existing super-chunk that is on-disk (frame). No in-memory copy is made.
blosc2_schunk_open_offset
@brief Open an existing super-chunk that is on-disk (frame). No in-memory copy is made.
blosc2_schunk_open_udio
@brief Open an existing super-chunk (no copy is made) using a user-defined I/O interface.
blosc2_schunk_reorder_offsets
@brief Reorder the chunk offsets of an existing super-chunk.
blosc2_schunk_set_slice_buffer
@brief Update a schunk slice from buffer.
blosc2_schunk_to_buffer
blosc2_schunk_to_file
blosc2_schunk_update_chunk
@brief Update a chunk at a specific position in a super-chunk.
blosc2_set_delta
@brief Select the delta coding filter to be used.
blosc2_set_maskout
@brief Set a maskout so as to avoid decompressing specified blocks.
blosc2_set_nthreads
@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.
blosc2_set_threads_callback
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. Passing NULL uses the default Blosc threading backend. The callback_data argument is passed through to the callback.
blosc2_stdio_close
blosc2_stdio_open
blosc2_stdio_read
blosc2_stdio_seek
blosc2_stdio_tell
blosc2_stdio_truncate
blosc2_stdio_write
blosc2_unidim_to_multidim
blosc2_vlmeta_add
@brief Add content into a new variable-length metalayer.
blosc2_vlmeta_delete
@brief Delete the variable-length metalayer from the super-chunk.
blosc2_vlmeta_exists
@brief Find whether the schunk has a variable-length metalayer or not.
blosc2_vlmeta_get
@brief Get the content out of a variable-length metalayer.
blosc2_vlmeta_get_names
@brief Get a list of all the variable-length metalayer names.
blosc2_vlmeta_update
@brief Update the content of an existing variable-length metalayer.
blosc_elapsed_nsecs
blosc_elapsed_secs
blosc_set_timestamp

Type Aliases§

_bindgen_ty_4
_bindgen_ty_5
_bindgen_ty_6
_bindgen_ty_7
_bindgen_ty_8
@brief Codes for the different tuners shipped with Blosc
_bindgen_ty_9
_bindgen_ty_10
@brief Codes for filters.
_bindgen_ty_11
@brief Codes for internal flags (see blosc1_cbuffer_metainfo)
_bindgen_ty_12
@brief Codes for new internal flags in Blosc2
_bindgen_ty_13
@brief Values for different Blosc2 capabilities
_bindgen_ty_14
_bindgen_ty_15
@brief Codes for the different compressors shipped with Blosc
_bindgen_ty_16
@brief Codes for compression libraries shipped with Blosc (code must be < 8)
_bindgen_ty_17
@brief The codes for compressor formats shipped with Blosc
_bindgen_ty_18
@brief The version formats for compressors shipped with Blosc. All versions here starts at 1
_bindgen_ty_19
_bindgen_ty_20
@brief Offsets for fields in Blosc2 chunk header.
_bindgen_ty_21
@brief Run lengths for special values for chunks/frames
_bindgen_ty_22
@brief Error codes Each time an error code is added here, its corresponding message error should be added in print_error()
_bindgen_ty_23
Structures and functions related with user-defined input/output.
_bindgen_ty_24
blosc2_close_cb
blosc2_codec_decoder_cb
blosc2_codec_encoder_cb
Structures and functions related with compression codecs.
blosc2_context
Structures and functions related with contexts.
blosc2_filter_backward_cb
blosc2_filter_forward_cb
Structures and functions related with filters plugins.
blosc2_frame
blosc2_open_cb
blosc2_postfilter_fn
@brief The type of the postfilter function.
blosc2_prefilter_fn
@brief The type of the prefilter function.
blosc2_read_cb
blosc2_seek_cb
blosc2_tell_cb
blosc2_truncate_cb
blosc2_write_cb
blosc_threads_callback
Pointer to a callback function that executes dojob(jobdata + i*jobdata_elsize) for i = 0 to numjobs-1, possibly in parallel threads (but not returning until all dojob 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 from blosc2_set_threads_callback.
blosc_timestamp_t