|
Tide 0.1.0
|
#include <cstddef>#include <istream>#include <ostream>#include <stdint.h>#include <utility>#include <vector>
Go to the source code of this file.
Namespaces | |
| namespace | tide |
| namespace | tide::vint |
Functions for managing variable-length integers. | |
Typedefs | |
| typedef std::pair< uint64_t, std::streamsize > | tide::vint::OffsetInt |
| The result type of s_to_u(). | |
| typedef std::pair< uint64_t, std::vector< char > ::const_iterator > | tide::vint::DecodeResult |
| The result of a decode operation is a pair of the integer decoded and an iterator pointing to the first element after the used data. | |
| typedef std::pair< uint64_t, std::streamsize > | tide::vint::ReadResult |
| The result of a read operation is a pair of the integer read and the number of bytes read. | |
Functions | |
| std::streamsize | tide::vint::size (uint64_t integer) |
| Get the size of an integer after encoding. | |
| OffsetInt | tide::vint::s_to_u (int64_t integer) |
| Offsets a signed integer into unsigned territory. | |
| int64_t | tide::vint::u_to_s (OffsetInt integer) |
| Offsets an unsigned integer into signed territory. | |
| std::vector< char > | tide::vint::encode (uint64_t integer, std::streamsize req_size=0) |
| Encode an unsigned integer into a buffer. | |
| DecodeResult | tide::vint::decode (std::vector< char > const &buffer) |
| Decode an unsigned variable-length integer from a buffer. | |
| std::streamsize | tide::vint::write (uint64_t integer, std::ostream &output, std::streamsize req_size=0) |
| Encode an unsigned integer and write it to an output stream. | |
| ReadResult | tide::vint::read (std::istream &input) |
| Decode an unsigned integer from an input stream. | |
1.7.3