Skip to content

Intermittent CRC mismatch when reading #35

@sidy3d

Description

@sidy3d

Hi,

It seems that some npz files are not decode properly. I get a crc mismatch which occurs in the following section of code:

libnpy/src/npz.cpp

Lines 446 to 455 in e76b1da

compression_method_t cmethod =
static_cast<compression_method_t>(entry.compression_method);
if (cmethod == compression_method_t::DEFLATED) {
uncompressed_bytes = npy_inflate(std::move(uncompressed_bytes));
}
std::uint32_t actual_crc32 = npy_crc32(uncompressed_bytes);
if (actual_crc32 != entry.crc32) {
throw std::logic_error("CRC mismatch");
}

Using 7z I've verified that the value reported by entry.crc32 is correct.

Thanks,

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions