I needed to read some base64 encoded data from my resources, so
instead of hacking up an RWFromMem and some existing base64 code, I
thought I’d streamline it a bit. I’m not sure about the read/write
operations, I made it so both encoder and decoder can only be written
to. Maybe one should be one way, and the other should be the other
way?
Regardless, this code works (I can encode and decode files and diff
can’t tell the difference), and I’ll be using it. Just thought I’d
share, and maybe someone can find some bugs.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: SDL_base64.c
Type: text/x-csrc
Size: 7929 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050223/f9d3417b/attachment.c
-------------- next part --------------
A non-text attachment was scrubbed…
Name: SDL_base64.h
Type: text/x-chdr
Size: 1637 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050223/f9d3417b/attachment.h
-------------- next part --------------
A non-text attachment was scrubbed…
Name: main.c
Type: text/x-csrc
Size: 570 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050223/f9d3417b/attachment-0001.c