[Haskell-cafe] Re: [Haskell] ANNOUNCE: binary: high performance,
pure binary serialisation
Neil Davies
semanticphilosopher at googlemail.com
Fri Jan 26 12:41:07 EST 2007
existing ecoding system - both the BER (Basic Encoding Rules) and the
PER (Packed Encoding Rules).
If you are looking to target a well supported standard - this would be the one.
Neil
On 26/01/07, Malcolm Wallace <Malcolm.Wallace at cs.york.ac.uk> wrote:
> Tomasz Zielonka <tomasz.zielonka at gmail.com> wrote:
>
> > Did you consider using an encoding which uses variable number of
> > bytes? If yes, I would be interested to know your reason for not
> > choosing such an encoding. Efficiency?
>
> My Binary implementation (from 1998) used a type-specific number of bits
> to encode the constructor - exactly as many as needed. (If you were
> writing custom instances, you could even use a variable number of bits
> for the constructor, e.g. using Huffman encoding to make the more common
> constructors have the shortest representation.)
>
> The latter certainly imposes an extra time overhead on decoding, because
> you cannot just take a fixed-size chunk of bits and have the value. But
> I would have thought that in the regular case, using a type-specific
> (but not constructor-specific) size for representing the constructor
> would be very easy and have no time overhead at all.
>
> Regards,
> Malcolm
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
More information about the Haskell-Cafe
mailing list