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

Fixed-size arrays #132

Open
lithdew opened this issue Jun 8, 2021 · 1 comment
Open

Fixed-size arrays #132

lithdew opened this issue Jun 8, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@lithdew
Copy link

lithdew commented Jun 8, 2021

Is your feature request related to a problem? Please describe.

Yes, I was hoping to remove the overhead of having to prefix a length to an array of bytes that I know is of a fixed length ahead of time. Fields that effectively denote a fixed-size array of arbitrary types are very common. Some examples of such fields would be 256-bit hashes, 16-byte UUIDs, 128-bit bitstrings, etc.

Describe the solution you'd like

A way to denote a field to be a fixed-sized array of some type. The schema syntax could be as simple as [N]T where N is the fixed number of elements stored in the array, and T is the type of the elements of the array.

Describe alternatives you've considered

Using variable-length arrays, which as mentioned incurs an unnecessary size overhead for the type of data concerned.

@lithdew lithdew added the enhancement New feature or request label Jun 8, 2021
@andrewmd5
Copy link
Contributor

To provide an update this is going through internal discussions now to identify if we promote it to a feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants