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

Add a macro to calculate encoded size from raw size and vice versa #116

Open
aklomp opened this issue Nov 3, 2022 · 0 comments
Open

Add a macro to calculate encoded size from raw size and vice versa #116

aklomp opened this issue Nov 3, 2022 · 0 comments
Assignees

Comments

@aklomp
Copy link
Owner

aklomp commented Nov 3, 2022

As discussed somewhat in #114, this library should export a macro to simplify calculating the buffer sizes. Two cases are needed:

  • Get encoded size from raw size.
  • Get raw size from encoded size.

The macros should take into account the potential presence of stream terminators, and should take care when using truncating integer division.

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