stdex Additional custom or not Standard C++ covered algorithms

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
stdex::hex_dec Class Reference

Hexadecimal decoding session. More...

`#include <stdex/hex.hpp>`

## Public Member Functions
| hex_dec () noexcept
| Constructs blank decoding session.
template<class T_to , class AX , class T_from >
void | decode (std::vector< T_to, AX > &out, bool &is_last, const T_from *data, size_t size)
| Decodes one block of information, and appends it to the output.
void | clear () noexcept
| Resets decoding session.
size_t | dec_size (size_t size) const noexcept
| Returns maximum decoded size.

## Protected Attributes
uint8_t | buf
| Internal buffer.
size_t | num
| Number of nibbles used in `buf`

## Detailed Description

Hexadecimal decoding session.

## Member Function Documentation

## ◆ dec_size()

size_t stdex::hex_dec::dec_size | ( | size_t | size | ) | const
| inline noexcept

Returns maximum decoded size.

Parameters

  [in] | size | Number of bytes to decode

Returns
  Maximum number of bytes for the decoded data of `size` length

## ◆ decode()

template<class T_to , class AX , class T_from >

void stdex::hex_dec::decode | ( | std::vector< T_to, AX > & | out,
|  | bool & | is_last,
|  | const T_from * | data,
|  | size_t | size )
| inline

Decodes one block of information, and appends it to the output.

Parameters

  [in,out] | out | Output
  [out] | is_last | Was this the last block of data? Actually, is this block of data complete?
  [in] | data | Data to decode
  [in] | size | Length of `data` in bytes

The documentation for this class was generated from the following file:

- include/stdex/hex.hpp