Wyatt Hepler | f9fb90f | 2020-09-30 18:59:33 -0700 | [diff] [blame] | 1 | .. _module-pw_bytes: |
shaneajg | 9c19db4 | 2020-06-11 15:49:51 -0400 | [diff] [blame] | 2 | |
| 3 | --------- |
| 4 | pw_bytes |
| 5 | --------- |
| 6 | pw_bytes is a collection of utilities for manipulating binary data. |
| 7 | |
| 8 | Compatibility |
| 9 | ============= |
| 10 | C++17 |
| 11 | |
| 12 | Dependencies |
| 13 | ============ |
| 14 | * ``pw_preprocessor`` |
| 15 | * ``pw_status`` |
| 16 | * ``pw_span`` |
| 17 | |
| 18 | Features |
| 19 | ======== |
| 20 | |
Wyatt Hepler | 05ca54c | 2020-09-02 17:04:59 -0700 | [diff] [blame] | 21 | pw_bytes/array.h |
| 22 | ---------------- |
| 23 | Functions for working with byte arrays, primarily for building fixed-size byte |
| 24 | arrays at compile time. |
shaneajg | 9c19db4 | 2020-06-11 15:49:51 -0400 | [diff] [blame] | 25 | |
Wyatt Hepler | 05ca54c | 2020-09-02 17:04:59 -0700 | [diff] [blame] | 26 | pw_bytes/byte_builder.h |
| 27 | ----------------------- |
| 28 | .. cpp:class:: ByteBuilder |
| 29 | |
| 30 | ``ByteBuilder`` is a class that facilitates building or reading arrays of |
| 31 | bytes in a fixed-size buffer. ByteBuilder handles reading and writing integers |
| 32 | with varying endianness. |
| 33 | |
Ewout van Bekkum | 5ea3340 | 2021-03-31 11:00:02 -0700 | [diff] [blame] | 34 | .. cpp:class:: template <size_t kMaxSize> ByteBuffer |
Wyatt Hepler | 05ca54c | 2020-09-02 17:04:59 -0700 | [diff] [blame] | 35 | |
| 36 | ``ByteBuilder`` with an internally allocated buffer. |
shaneajg | 3181d18 | 2020-06-17 20:17:23 -0400 | [diff] [blame] | 37 | |
shaneajg | f20ef8e | 2020-06-30 16:15:58 -0400 | [diff] [blame] | 38 | Size report: using ByteBuffer |
| 39 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 40 | .. include:: byte_builder_size_report |
| 41 | |
Wyatt Hepler | 05ca54c | 2020-09-02 17:04:59 -0700 | [diff] [blame] | 42 | pw_bytes/endian.h |
| 43 | ----------------- |
| 44 | Functions for converting the endianness of integral values. |