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

API to calculate size of fixed-size types #44

Open
danvk opened this issue Apr 2, 2015 · 1 comment
Open

API to calculate size of fixed-size types #44

danvk opened this issue Apr 2, 2015 · 1 comment

Comments

@danvk
Copy link

danvk commented Apr 2, 2015

While creating custom types, it's sometimes helpful to know the size (in bytes) of a base type. In general this isn't possible to compute (because of dynamically-sized elements), but for simple types like int32 and objects composed of these simple types, it is.

It would be helpful if there were a computeSize(type) method on the jBinary object, or perhaps a computeSize method on type descriptors which would produce this information when it's available.

@RReverser
Copy link
Member

Yeah, I started smth similar earlier but thought that not much use cases actually need it (while the size of the library might blow).

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

2 participants