Crate libbzip3_sys

source ·

Structs

Constants

Functions

  • @brief Return the recommended size of the output buffer for the compression functions.
  • @brief Compress a block of data. This function does not support parallelism by itself, consider using the low level bz3_encode_blocks() function instead. Using the low level API might provide better performance. Returns a bzip3 error code; BZ3_OK when the operation is successful. Make sure to set out_size to the size of the output buffer before the operation; out_size must be at least equal to `bz3_bound(in_size)’.
  • @brief Decode a single block. buffer' must be able to hold at least orig_size’ bytes. The size must not exceed the block size associated with the state. @param size The size of the compressed data in `buffer’ @param orig_size The original size of the data before compression.
  • @brief Decode n' blocks, all in parallel. Same specifics as bz3_encode_blocks’, but doesn’t overwrite `sizes’.
  • @brief Decompress a block of data. This function does not support parallelism by itself, consider using the low level bz3_decode_blocks() function instead. Using the low level API might provide better performance. Returns a bzip3 error code; BZ3_OK when the operation is successful. Make sure to set out_size to the size of the output buffer before the operation.
  • @brief Encode a single block. Returns the amount of bytes written to buffer'. buffer’ must be able to hold at least `bz3_bound(size)’ bytes. The size must not exceed the block size associated with the state.
  • @brief Encode n' blocks, all in parallel. All specifics of the bz3_encode_block’ still hold. The function will launch a thread for each block. The compressed sizes are written to the sizes' array. Every buffer is overwritten and none of them can overlap. Precisely n’ states, buffers and sizes must be supplied.
  • @brief Free the memory occupied by a block encoder state.
  • @brief Get the last error number associated with a given state.
  • @brief Construct a new block encoder state, which will encode blocks as big as the given block size. The decoder will be able to decode blocks at most as big as the given block size. Returns NULL in case allocation fails or the block size is not between 65K and 511M
  • @brief Return a user-readable message explaining the cause of the last error.
  • @brief Get bzip3 version.

Type Aliases