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

Be more public about the fact that converting from Bytes to Sectors can result in overflow #912

Open
mulkieran opened this issue Mar 22, 2024 · 0 comments

Comments

@mulkieran
Copy link
Member

This is a necessary consequence of our design decisions to use 128 bit value for Bytes and 64 bit value for sectors.

Given b where (2^128 - 1) > b > (2^64 - 1)*2^9 , Bytes(b).sectors() evaluates to 0.

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

No branches or pull requests

1 participant