Function blosc_src::blosc_cbuffer_validate[][src]

pub unsafe extern "C" fn blosc_cbuffer_validate(
    cbuffer: *const c_void,
    cbytes: usize,
    nbytes: *mut usize
) -> c_int
Expand description

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.

On success, returns 0 and sets *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.

On failure, returns -1.