Closed mprorock closed 5 days ago
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.
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
todo: add design considerations to make implementations as simple as possible / pending close
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 sidebits
as suggested in #47then 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