Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Classes | Namespaces | Functions
base_codec.hpp File Reference
#include <string>
#include <vector>
#include <type_traits>
#include <jau/int_types.hpp>
Include dependency graph for base_codec.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  jau::codec::base::alphabet
 Base Alphabet Specification providing the alphabet for encode() and decode(). More...
 
class  jau::codec::base::ascii38_alphabet
 Safe base 38 alphabet with ASCII code-point sorting order. More...
 
class  jau::codec::base::ascii64_alphabet
 Safe base 64 alphabet with ASCII code-point sorting order. More...
 
class  jau::codec::base::ascii86_alphabet
 Base 86 alphabet with ASCII code-point sorting order. More...
 
class  jau::codec::base::base64_alphabet
 Safe canonical base64 alphabet, without ASCII code-point sorting order. More...
 
class  jau::codec::base::base64url_alphabet
 Safe canonical base64url alphabet, without ASCII code-point sorting order. More...
 
class  jau::codec::base::natural64_alphabet
 Safe natural base 64 alphabet, both without ASCII code-point sorting order. More...
 
class  jau::codec::base::natural86_alphabet
 Natural base 86 alphabet, without ASCII code-point sorting order. More...
 

Namespaces

namespace  jau
 __pack(...): Produces MSVC, clang and gcc compatible lead-in and -out macros.
 
namespace  jau::codec
 
namespace  jau::codec::base
 Base codecs, i.e.
 

Functions

int64_t jau::codec::base::decode (const std::string_view &str, const alphabet &aspec) noexcept
 Decodes a given symbolic string representing a given alphabet and its base to a positive decimal number. More...
 
std::vector< uint8_t > jau::codec::base::decode64 (const std::string_view &str, const alphabet &aspec) noexcept
 Decodes a given symbolic string representing using given alphabet and fixed base 64 to octets according to base64 RFC 4648. More...
 
std::vector< uint8_t > jau::codec::base::decode64_lf (const std::string_view &str, const alphabet &aspec) noexcept
 Decodes a given symbolic string representing using given alphabet and fixed base 64 to octets according to base64 RFC 4648 and removes all linefeeds before decoding as required for PEM and MIME. More...
 
std::vector< uint8_t > jau::codec::base::decode64_lf (std::string &str, const alphabet &aspec) noexcept
 Decodes a given symbolic string representing using given alphabet and fixed base 64 to octets according to base64 RFC 4648 and removes all linefeeds before decoding as required for PEM and MIME. More...
 
std::string jau::codec::base::encode (int num, const alphabet &aspec, const unsigned int min_width=0) noexcept
 Encodes a given positive decimal number to a symbolic string representing a given alphabet and its base. More...
 
std::string jau::codec::base::encode (int64_t num, const alphabet &aspec, const unsigned int min_width=0) noexcept
 Encodes a given positive decimal number to a symbolic string representing a given alphabet and its base. More...
 
std::string jau::codec::base::encode64 (const void *in_octets, size_t in_len, const alphabet &aspec) noexcept
 Encodes given octets using the given alphabet and fixed base 64 encoding according to base64 RFC 4648. More...
 
std::string jau::codec::base::encode64_mime (const void *in_octets, size_t in_len, const alphabet &aspec) noexcept
 Encodes given octets using the given alphabet and fixed base 64 encoding according to base64 RFC 4648 and adds line-feeds every 76 characters as required for MIME. More...
 
std::string jau::codec::base::encode64_pem (const void *in_octets, size_t in_len, const alphabet &aspec) noexcept
 Encodes given octets using the given alphabet and fixed base 64 encoding according to base64 RFC 4648 and adds line-feeds every 64 characters as required for PEM. More...
 
size_t jau::codec::base::insert_lf (std::string &str, const size_t period) noexcept
 Inserts a line feed (LF) character \n (ASCII 0x0a) after every period of characters. More...
 
bool jau::codec::base::operator!= (const alphabet &lhs, const alphabet &rhs) noexcept
 
bool jau::codec::base::operator== (const alphabet &lhs, const alphabet &rhs) noexcept
 
size_t jau::codec::base::remove_lf (std::string &str) noexcept
 Removes line feed character from str. More...
 
std::string jau::codec::base::to_string (const alphabet &v) noexcept