Rosetta
Namespaces | Functions
Binary_Util.cc File Reference
#include <utility/Binary_Util.hh>
#include <string>
#include <algorithm>

Namespaces

 utility
 unresizable vector whose size is known at compile time, which may be allocated on the stack, and which indexes from 0.
 

Functions

void utility::swap4_aligned (void *v, long ndata)
 
void utility::encode6bit (const unsigned char *memory, unsigned int length, std::string &jar)
 Given a block of memory (with memory pointing to the first byte) and a byte count (length), convert every three bytes of memory into four bytes of ASCII characters, and populate the string (jar) with those characters. More...
 
platform::Size utility::decode6bit (unsigned char *memory, std::string const &jar, platform::Size const maxbytes)
 Given 3*N bytes of memory to fill, and a string containing 4*N characters, decode the characters (interpreting 4 bytes of ASCII text as 3 binary bytes) and populate the block of memory. More...