[Haskell-cafe] Binary serialization, was Re: Abstraction leak
bulat.ziganshin at gmail.com
Wed Jul 4 13:15:59 EDT 2007
Wednesday, July 4, 2007, 7:31:56 PM, you wrote:
> On Wed, Jul 04, 2007 at 06:52:08PM +0400, Bulat Ziganshin wrote:
>>Wednesday, July 4, 2007, 5:50:42 PM, you wrote:
>>> This doesn't seem to deal with endianness. Am I missing something?
> Nice: bit aligning if you want it, little or big endian IO. Intermixed
> endianness in the same datastream even. However:
> 3.2.10 Defining Binary instances for custom serialization formats (unwritten)
> Does that mean that the code is unwritten or that the documentation is
> unwritten. IAMFI :)
of course all "unwritten" notes means unfinished docs. library
contains more than 100 functions so it was not easy to document them
all. you can browse sources, although probably it will not help too
in particular interest for you should be the following:
- Template Haskell can used to automatically derive new Binary instances
for specifying width of fields you may use int/word with specific
width, for example:
data Header = H Int32 Word16 Word8
(see DeriveBinary.hs example)
if you need to define instances manually, ask me
> There seems to be some overlap between Streams and ByteStrings: Could
> a Stream built on a ByteString backend benefit from all the fusion
> work that's been put into ByteStrings recently? Oh wait, I see you
> list that as 'future work' on the wiki page...
if you will write all popular words together, this probably will be
just a set of popular words, not something working :) how fusion
should work together with serialization?
>  Which sick application *needs* intermixed endianness?
i just tried to implement everything possible :)
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe