# BoundedArray: a simple way to represent small data whose max size is known \(\#9134\) · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/8a37fe21764659c5f742454a4eb9950b5c747a42)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 8a37fe21764659c5f742454a4eb9950b5c747a42

Requested commit: 8a37fe21764659c5f742454a4eb9950b5c747a42

Commit: 8a37fe21764659c5f742454a4eb9950b5c747a42

Tree: 1f2b5b9fcf5cd9aa4156e9c75cccc4590837f616

Author: Frank Denis

Committer: GitHub

## Message

```
BoundedArray: a simple way to represent small data whose max size is known (#9134)

This is a simple structure containing an array and a length, that can be viewed as a slice.

It is useful to pass-by-copy small data whose exact size is known at runtime, but whose maximum size is known at comptime. This greatly simplifies code that otherwise would require an allocator, or reimplementing what this type does.
```

## Parents

- [8c41a8e761cb609d927b0f2c3c3c094970d2eb58](https://git.cafe/gitcafe/zig/commit/8c41a8e761cb609d927b0f2c3c3c094970d2eb58?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/8a37fe21764659c5f742454a4eb9950b5c747a42?format=markdown)
