libmdbx  0.11.6.39 (2022-04-13T11:05:50+03:00)
One of the fastest compact embeddable key-value ACID database without WAL.
mdbx::from_base64 Struct Reference

Base64 decoder which satisfy SliceTranscoder concept. More...

#include <mdbx.h++>

Public Member Functions

MDBX_CXX11_CONSTEXPR from_base64 (const slice &source, bool ignore_spaces=false) noexcept
 
template<class ALLOCATOR = legacy_allocator>
string< ALLOCATOR > as_string (const ALLOCATOR &allocator=ALLOCATOR()) const
 Decodes Base64 dump from a passed slice to returned string. More...
 
template<class ALLOCATOR = legacy_allocator, typename CAPACITY_POLICY = default_capacity_policy>
buffer< ALLOCATOR, CAPACITY_POLICY > as_buffer (const ALLOCATOR &allocator=ALLOCATOR()) const
 Decodes Base64 dump from a passed slice to returned buffer. More...
 
MDBX_CXX11_CONSTEXPR size_t envisage_result_length () const noexcept
 Returns the number of bytes needed for conversion Base64 dump from a passed slice to decoded data. More...
 
char * write_bytes (char *dest, size_t dest_size) const
 Fills the destination with data decoded from Base64 dump from a passed slice. More...
 
bool is_empty () const noexcept
 Checks whether a passed slice is empty, and therefore there will be no output bytes. More...
 
bool is_erroneous () const noexcept
 Checks whether the content of a passed slice is a valid Base64 dump, and therefore there could be decoded or not. More...
 

Public Attributes

const slice source
 
const bool ignore_spaces = false
 

Detailed Description

Base64 decoder which satisfy SliceTranscoder concept.

Constructor & Destructor Documentation

◆ from_base64()

MDBX_CXX11_CONSTEXPR mdbx::from_base64::from_base64 ( const slice source,
bool  ignore_spaces = false 
)
inlinenoexcept

Member Function Documentation

◆ as_buffer()

template<class ALLOCATOR = legacy_allocator, typename CAPACITY_POLICY = default_capacity_policy>
buffer<ALLOCATOR, CAPACITY_POLICY> mdbx::from_base64::as_buffer ( const ALLOCATOR &  allocator = ALLOCATOR()) const
inline

Decodes Base64 dump from a passed slice to returned buffer.

◆ as_string()

template<class ALLOCATOR = legacy_allocator>
string<ALLOCATOR> mdbx::from_base64::as_string ( const ALLOCATOR &  allocator = ALLOCATOR()) const
inline

Decodes Base64 dump from a passed slice to returned string.

◆ envisage_result_length()

MDBX_CXX11_CONSTEXPR size_t mdbx::from_base64::envisage_result_length ( ) const
inlinenoexcept

Returns the number of bytes needed for conversion Base64 dump from a passed slice to decoded data.

◆ is_empty()

bool mdbx::from_base64::is_empty ( ) const
inlinenoexcept

Checks whether a passed slice is empty, and therefore there will be no output bytes.

◆ is_erroneous()

bool mdbx::from_base64::is_erroneous ( ) const
noexcept

Checks whether the content of a passed slice is a valid Base64 dump, and therefore there could be decoded or not.

◆ write_bytes()

char* mdbx::from_base64::write_bytes ( char *  dest,
size_t  dest_size 
) const

Fills the destination with data decoded from Base64 dump from a passed slice.

Exceptions
std::length_errorif given buffer is too small.

Member Data Documentation

◆ ignore_spaces

const bool mdbx::from_base64::ignore_spaces = false

◆ source

const slice mdbx::from_base64::source

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