ANNOUNCE: binary-generic-0.2, generic binary serialisation using binary and syb.

Hello cafe, although there was no announcement for version 0.1 there is one for the current 0.2: binary-generic allows to perform binary serialisation without explicitly defining every type specific case. If an algebraic type instantiates the 'Data' class the library is able to serialize it in a canonical way. Unfortunately version 0.2 is not binary compatible with 0.1. I decided to break this for the sake of simplicity: In 0.2 all multibyte values are encoded big-endian. For further version I'll try to supply compatibility functions even if something changes, but since 0.1 is not even a week old, I think it's not necessary this time. Okay, features: Common primitive types are supported out of the box: * Char, Word, Int are serialised as big-endian, taken from Data.Binary * Float and Double are serialised big-endian according to binary-ieee754 * Integer is serialized as in Data.Binary, but consistently big-endian * Data.ByteString as it is * Data.Text as Utf8 For types that are not supported yet, there is described an easy way of extension in 'Data.Binary.Extensions'. You are also free to ovveride certain choices and supply your own. If you think there are more types that should be supported without explicit extension, drop me a line. Cheers, Lars

On 21.08.2010 01:38, Lars Petersen wrote:
* Float and Double are serialised big-endian according to binary-ieee754
I'd like to point out that binary-ieee754 is dead slow[1] and not usable when one cares about performance. IMHO lack of ways to serialize floating point data in IEEE754 format is one of the problems of binary package. [1] ~30 times slower that reading/writing with peek/poke although I had to patch binary for that.
participants (2)
-
Alexey Khudyakov
-
Lars Petersen