Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fletcher checksum codec #410

Closed
rabernat opened this issue Dec 19, 2022 · 2 comments · Fixed by #412
Closed

Fletcher checksum codec #410

rabernat opened this issue Dec 19, 2022 · 2 comments · Fixed by #412

Comments

@rabernat
Copy link
Contributor

It would be great if numcodecs could implement the Fletcher checksum algorithm in a way compatible with how hdf5 does it. In this version, the checksum is simply appended to the end of the chunk bytes. See fsspec/kerchunk#274 for a dummy passthrough version.

There are some python implementations here:

@martindurant
Copy link
Member

Some (fast) C implementations mentioned in https://stackoverflow.com/questions/40270450/correctness-of-fletcher32-checksum-algorithm (would cython well)

@rabernat
Copy link
Contributor Author

And just for completeness, here is the hdf5 version as vendored by netcdf4:

https://github.com/Unidata/netcdf-c/blob/8eb71290eb9360dcfd4955ba94759ba8d02c40a9/plugins/H5checksum.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants