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

arbitrary size restrictions on status #52

Closed
mprorock opened this issue Aug 4, 2023 · 3 comments
Closed

arbitrary size restrictions on status #52

mprorock opened this issue Aug 4, 2023 · 3 comments

Comments

@mprorock
Copy link

mprorock commented Aug 4, 2023

Is there a good reason to limit size to "Each status of a Referenced Token MUST be represented with a bit size of 1,2,4, or 8"

This can easily be resolved by setting a size parameter along side bits as suggested in #47

then you can easily seek to the bits you are after since you know the max size and the number of bits each status takes up

This also permits implementers to cover both cases where packing into 3 bits is desireable for space reasons, or have a large number of potential statuses to reflect

@c2bo
Copy link
Member

c2bo commented Aug 5, 2023

This was mainly a choice for simplicity of implementation: by only allowing bit sizes of 1,2,4,8, we only need to manipulate a single byte in an array.

@paulbastian
Copy link
Contributor

Optimisations for 3 bits are not worth it, as the expected number of usecases is negligible and the optimisation is not really worth it as the compression is still working well enough for 4 bits

@paulbastian
Copy link
Contributor

todo: add design considerations to make implementations as simple as possible / pending close

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

3 participants