third_party.pigweed.src/pw_bytes/docs.rst
shaneajg 3181d18e36 pw_bytes: Added an ordered put method for values
Added functionality to insert values to the buffer in the endianness
order as specified by the user.

Change-Id: Ie33ac7a38a35cdd1cfdb2952233d13f09242cc8c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/12472
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Shane Gomindes <shaneajg@google.com>
2020-06-19 21:01:52 +00:00

40 lines
904 B
ReStructuredText

.. _chapter-pw-bytes:
.. default-domain:: cpp
.. highlight:: sh
---------
pw_bytes
---------
pw_bytes is a collection of utilities for manipulating binary data.
Compatibility
=============
C++17
Dependencies
============
* ``pw_preprocessor``
* ``pw_status``
* ``pw_span``
Features
========
pw::ByteBuilder
-----------------
ByteBuilder is a utility class which facilitates the creation and
building of formatted bytes in a fixed-size buffer.
Utilities for building byte arrays at run time
------------------------------------------------
-``PutInt8``, ``PutUInt8``: Inserts 8-bit integers.
-``PutInt16``, ``PutInt16``: Inserts 16-bit integers in little/big endian.
-``PutInt32``, ``PutUInt32``: Inserts 32-bit integers in little/big endian.
-``PutInt64``, ``PutInt64``: Inserts 64-bit integers in little/big endian.
Future work
^^^^^^^^^^^
- Utilities for building byte arrays at compile time.