2 * UCW Library -- Base 224 Encoding & Decoding
4 * (c) 2002 Martin Mares <mj@ucw.cz>
6 * This software may be freely distributed and used according to the terms
7 * of the GNU Lesser General Public License.
10 uns base224_encode(byte *dest, const byte *src, uns len);
11 uns base224_decode(byte *dest, const byte *src, uns len);
14 * Warning: when encoding, at least 4 bytes of extra space are needed.
15 * Better use this macro to calculate buffer size.
17 #define BASE224_ENC_LENGTH(x) (((x)*8+38)/39*5)
20 * When called for BASE224_IN_CHUNK-byte chunks, the result will be
21 * always BASE224_OUT_CHUNK bytes long. If a longer block is split
22 * to such chunks, the result will be identical.
24 #define BASE224_IN_CHUNK 39
25 #define BASE224_OUT_CHUNK 40