Thursday, March 22, 2012

Compression

Hi,

Well, I took a little break from doing parsing and serialization whilst I wait for others to get set up to use the serializer/deserializer.

Some, especially Alex, expressed concern that serialized data or the generated HTML would be very large and difficult to send.  So, I wrote a compression wrapper around Java's Inflate/Deflate APIs.  It turns out that Java's String.getBytes(...) method is broken, which made this difficult.  After some false starts, I finally just gave up trying to work around their bugs and just wrote out what the methods were supposed to do myself.

The algorithm is the standard ZLIB compression algorithm, which should be able to achieve very good compression rates.

I may try writing an encryption algorithm as well.

Ian

No comments:

Post a Comment