| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| liby64-0.2.tar.gz | 2013-07-08 | 317.5 kB | |
| liby64-0.1.tar.gz | 2012-01-22 | 312.1 kB | |
| README | 2012-01-22 | 849 Bytes | |
| Totals: 3 Items | 630.4 kB | 2 |
This library provides translation of arrays of byte values to the y64 format.
Y64 is a variant of Base64 encoding designed to be URL safe. It was developed
and used at Yahoo. For more information, see
http://en.wikipedia.org/wiki/Base64 and
http://www.yuiblog.com/blog/2010/07/06/in-the-yui-3-gallery-base64-and-y64-encod
ing/
Much of the code came directly from libb64
(https://sourceforge.net/projects/libb64/).
To install:
./configure
make
(optionally) make check
make install
Q: How many bytes should one alloc to store an n-byte block using this library?
A: Generally, since Y64 is fundamentally converting digits stored as 8 bits to
digits stored in 6 bits, it requires 4 bytes to encode 3 bytes as Y64.
Use the following formula:
bytes_to_malloc = ( n % 3 ) ? ( ( n / 3 ) * 4 ) + ( n % 3 ) + 1 : ( n / 3 ) * 4 ;