codex
Loading...
Searching...
No Matches
anonymous_namespace{base64.cpp} Namespace Reference

Functions

template<unsigned char M>
constexpr auto rmask (char c)
 Applies a mask and shifts right.
 
template<unsigned char M>
constexpr auto lmask (char c)
 Shifts left and applies a mask.
 
template<unsigned char LM>
constexpr auto merge (char c0, char c1)
 Merges parts of two bytes according to a mask.
 
template<auto max>
constexpr bool check (auto ...vs)
 Checks that no value is equal to max, which must be a power of 2.
 
constexpr auto lu (const auto &t, auto c)
 Looks up the value of byte c in look-up table t.
 

Function Documentation

◆ check()

template<auto max>
bool anonymous_namespace{base64.cpp}::check ( auto ... vs)
constexpr

Checks that no value is equal to max, which must be a power of 2.

◆ lmask()

template<unsigned char M>
auto anonymous_namespace{base64.cpp}::lmask ( char c)
constexpr

Shifts left and applies a mask.

The input is shifted left by the amount of zero bits on the right side of the mask and the mask is applied.

Here is the caller graph for this function:

◆ lu()

auto anonymous_namespace{base64.cpp}::lu ( const auto & t,
auto c )
constexpr

Looks up the value of byte c in look-up table t.

◆ merge()

template<unsigned char LM>
auto anonymous_namespace{base64.cpp}::merge ( char c0,
char c1 )
constexpr

Merges parts of two bytes according to a mask.

Applies lmask to c0 and rmask to c1 using LM and its opposite and combines the result.

Here is the call graph for this function:

◆ rmask()

template<unsigned char M>
auto anonymous_namespace{base64.cpp}::rmask ( char c)
constexpr

Applies a mask and shifts right.

The mask is applied to the input byte and the result is shifted right by the amount of zero bits on the right side of the mask.

Here is the caller graph for this function: