jackh726 / bigtools

A high-performance BigWig and BigBed library in Rust
MIT License
65 stars 5 forks source link

Fix bytes read in get_zoom_block_values #3

Closed pkerpedjiev closed 1 year ago

pkerpedjiev commented 1 year ago

get_zoom_block_values was trying to read itemcount * 64 bytes from data_mut, but data_mut is only itemcount * 64 bytes long.

Changed the # of bytes read and added a test to verify. Without this change the test errors out with

[Err(IoError(Error { kind: UnexpectedEof, message: "failed to fill whole buffer" }))]