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 _Ty , class _Ax , class _Tchr >
void decode (std::vector< _Ty, _Ax > &out, bool &is_last, const _Tchr *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
inlinenoexcept

Returns maximum decoded size.

Parameters
[in]sizeNumber of bytes to decode
Returns
Maximum number of bytes for the decoded data of size length

◆ decode()

template<class _Ty , class _Ax , class _Tchr >
void stdex::hex_dec::decode ( std::vector< _Ty, _Ax > &  out,
bool &  is_last,
const _Tchr *  data,
size_t  size 
)
inline

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

Parameters
[in,out]outOutput
[out]is_lastWas this the last block of data? Actually, is this block of data complete?
[in]dataData to decode
[in]sizeLength of data in bytes

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