Minsky
a85.h
Go to the documentation of this file.
1 #ifndef A85_H
2 #define A85_H
3 
4 #include <stdint.h>
5 
6 namespace a85 {
7 
8 typedef uint8_t u8;
9 typedef uint32_t u32;
10 
11 // Returns size of buffer required for to_a85 function.
12 int size_for_a85(int binlen, bool append_null = false);
13 
14 // Translates the given binary data of the given size to Ascii85.
15 // Can translate in-place.
16 // Optionally appends a null character.
17 void to_a85(const u8* data, int binlen, char* text, bool append_null = false);
18 
19 // Returns the size of buffer required for from_a85 function.
20 int size_for_bin(int textlen);
21 
22 // Translates the given Ascii85 text to binary data.
23 // Can translate in-place.
24 void from_a85(const char* text, int textlen, u8* data);
25 
26 } // namespace a85
27 #endif
int size_for_bin(int textlen)
Definition: a85.cc:52
Definition: a85.cc:6
void to_a85(const u8 *data, int binlen, char *text, bool append_null)
Definition: a85.cc:12
void from_a85(const char *text, int textlen, u8 *data)
Definition: a85.cc:56
uint8_t u8
Definition: a85.h:8
int size_for_a85(int binlen, bool append_null)
Definition: a85.cc:8
uint32_t u32
Definition: a85.h:9