[Haskell-cafe] Serializing with alignment
ben.franksen at online.de
Wed Nov 7 01:58:20 CET 2012
Vincent Hanquez wrote:
> On 11/06/2012 09:33 PM, Ben Franksen wrote:
>> I want to implement a binary protocol that, unfortunately, has some
>> alignment restrictions.
> I don't think such thing currently exists.
> Not sure that's any help to you (and definitely not answering your
> binary question), but I rolled my own 'put' for a dbus implementation:
Interesting. Seems you also needed aligned read/write. You are using a state
monad, too. Maybe I should just go ahead and wrap a StateT over the PutM
from binary, at least this lets me re-use the efficient concatenation that's
built into binary's PutM (or rather, the Builder below it).
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
More information about the Haskell-Cafe