You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been reading the code, and there is one thing I am curious about. Why is the encoding_position an u128?
I mean - I get it. If you encode 2^64 bytes of data, the encoded length will be more than 2^64 bytes, and therefore you need an u128 to track the encoded position. But what good does that do you?
All file operations including seek, length etc. use u64. So as soon as your encoding is larger than 2^64, everything is broken anyway. Wouldn't it be better to do a checked addition whenever the result could exceed u64, and then just produce an error?
Just curious
The text was updated successfully, but these errors were encountered:
I have been reading the code, and there is one thing I am curious about. Why is the encoding_position an u128?
I mean - I get it. If you encode 2^64 bytes of data, the encoded length will be more than 2^64 bytes, and therefore you need an u128 to track the encoded position. But what good does that do you?
All file operations including seek, length etc. use u64. So as soon as your encoding is larger than 2^64, everything is broken anyway. Wouldn't it be better to do a checked addition whenever the result could exceed u64, and then just produce an error?
Just curious
The text was updated successfully, but these errors were encountered: