pub fn decompress<T: Copy>(src: &Buffer<T>) -> Result<Vec<T>>Expand description
Decompress a blosc::Buffer into a newly allocated Vec
§Safety
decompress is safe to use because the compiler will guarantee that src
came from the output of Context::compress.
§Example
The compiler won’t allow decompressing into the wrong type.
ⓘ
let data: Vec<u16> = vec![1, 2, 3, 65535];
let ctx = Context::new();
let compressed = ctx.compress(&data[..]);
let decompressed: Vec<i16> = decompress(&compressed).unwrap();