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

Change Encoding parameter sizes #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

madsmtm
Copy link

@madsmtm madsmtm commented Jun 1, 2021

  • Decrease Encoding::BitField size from u32 to u8
    • A bitfield can only be created from integral types, whose maximum size is 64 (which can easily fit inside a u8)
  • Increase Encoding::Array length from u32 to usize
    • @encode can output an array size up to 2^61 - 1 elements:
    NSLog(@"Encoding: %s", @encode(char [((unsigned long long)(2) << 60) - 1]));

These are breaking changes, so we'd have to bump the major version number.

Please correct me on these if I'm wrong!

@encode can output an array size up to 2^61 - 1 elements.
A bitfield can only be created from integral types, whose maximum size is 64 (which can easily fit inside a u8)
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 this pull request may close these issues.

1 participant