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

Don't use int for bits field in gzip_index_point #35

Closed
rdpsin opened this issue Aug 23, 2022 · 0 comments · Fixed by #46
Closed

Don't use int for bits field in gzip_index_point #35

rdpsin opened this issue Aug 23, 2022 · 0 comments · Fixed by #46
Assignees

Comments

@rdpsin
Copy link
Contributor

rdpsin commented Aug 23, 2022

Is your feature request related to a problem? Please describe.
Currently, the bits field in gzip_index_point has the type int which is 4 bytes on most implementations. However, it only needs to contain values for 0-7. The problem is compounded because we only serialize/deserialize 1 byte out of the 4. Changing it to use a smaller sized integer which shave off a few bytes, but more importantly, help get rid of pesky bugs like #24.

Describe the solution you'd like
Use something like uint8_t or int8_t to represent bits.

Describe alternatives you've considered
N/A

Additional context
N/A

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.

1 participant