Skip to content

Commit

Permalink
fix blosc loading
Browse files Browse the repository at this point in the history
  • Loading branch information
rosaliedewinther committed Dec 8, 2024
1 parent f146fc0 commit 1cb9e77
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ impl<R: Read + Seek> VdbReader<R> {
count: usize,
) -> Result<Vec<T>, ParseError> {
Ok(if gd.compression.contains(Compression::BLOSC) {
if count <= 0 {
return Ok(vec![T::zeroed(); count as usize]);
}
let num_compressed_bytes = reader.read_i64::<LittleEndian>()?;
let compressed_count = num_compressed_bytes / std::mem::size_of::<T>() as i64;

Expand Down

0 comments on commit 1cb9e77

Please sign in to comment.