-
Notifications
You must be signed in to change notification settings - Fork 106
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
Make bitmap of arbitrary size #211
Conversation
d8942c6
to
cd2b372
Compare
It sounds like |
LGTM my advice is
|
@adamdecaf our current behaviour is |
@mfdeveloper508 thanks for the suggestions I tried to not break anything. Now integration will be broken only if I like your proposal, but I'm afraid as it's a not backward compatible change, I would vote for
I'm also not aware of cases with auto-expanding bitmaps of length different than 8. But maybe there are such cases? |
Thanks for making it backwards compatible. |
What
DisableAutoExpand
(bool) to the field spec. Used by thefield.Bitmap
field.Bitmap
will be just a fixed bitmapDisableAutoExpand
to true)Example of how to create fixed bitmap:
Why
P.S. Note, for most card brands, the default single bitmap size is 8 bytes (64 bits). Because of the previous implementation, the Length parameter was ignored and instead underlying storage for the 3 (max allowed) bitmaps was used. For all operations, it calculated the number of bitmaps based on the bits set. So, if for auto-expanding bitmaps you use 16 or something else, then bitmap will be expanded by 16 bytes for new bitmaps. That's not what you want. Just change from 16 to 8.