24#include <boost/scoped_array.hpp>
32 : encode((
unsigned char*)
33 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
34 "abcdefghijklmnopqrstuvwxyz"
37 , decode(
new unsigned char[257]) {
38 memset(decode.get(), 0, 256);
39 for (
int i = 0; i < 64; i++) {
40 decode[encode[i]] = i;
49 return encode[x & 0x3f];
53 const unsigned char* encode;
56 boost::scoped_array<unsigned char> decode;
62void encode(std::stringstream& ss,
const char* data,
int size);
63std::string encode(
const char* data,
int size);
64std::string encode(
const std::string& s);
66void decode(std::stringstream& ss,
const std::string& s);
67std::string decode(
const std::string& s);
69extern const char* chars;
Utility functions for parsing numbers from strings.
Definition compare_numbers.h:20