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

Remove min_code_units and max_code_units data members from encodings #3

Open
tahonermann opened this issue Jan 22, 2016 · 0 comments
Open
Assignees

Comments

@tahonermann
Copy link
Owner

The min_code_units and max_code_units data members of encoding types were originally added to facilitate code unit storage allocation given a sequence of code points. For encodings like UTF16 with a BOM, these data members don't suffice due to the storage overhead required for a BOM. Additionally, encodings that support non-code-point encoding state transitions, overhead is potentially unbounded and not reflected in these values.

At present, these values are only used to determine if an encoding can potentially support random access to code points (when min_code_units == max_code_units and the encoding is stateless). Removal of these data members will require some other means to determine if an encoding is a stateless fixed-length encoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant