third_party.pigweed.src/pw_bytes/docs.rst
Wyatt Hepler 05ca54ccbc pw_bytes: Functions for converting endianness
- Create pw_bytes/endian.h, which provides functions for converting
  integer byte order.
- Update pw_bytes docs.

Change-Id: Icacc91d8c5d4f185c562f3b20b7249572ad84f5d
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/17464
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2020-09-09 20:37:54 +00:00

49 lines
1002 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_bytes/array.h
----------------
Functions for working with byte arrays, primarily for building fixed-size byte
arrays at compile time.
pw_bytes/byte_builder.h
-----------------------
.. cpp:class:: ByteBuilder
``ByteBuilder`` is a class that facilitates building or reading arrays of
bytes in a fixed-size buffer. ByteBuilder handles reading and writing integers
with varying endianness.
.. cpp:class:: template <size_t max_size> ByteBuffer
``ByteBuilder`` with an internally allocated buffer.
Size report: using ByteBuffer
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. include:: byte_builder_size_report
pw_bytes/endian.h
-----------------
Functions for converting the endianness of integral values.