<div class="gmail_quote">On 10 January 2011 22:30, Henning Thielemann <span dir="ltr"><<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
John Lato schrieb:<br>
<div class="im"><br>
> You could use my "word24" package[1] (GHC only) to provide non-aligned<br>
> 24-bit word and int types with Storable instances. You should be able<br>
> to write a binary instance (or whatever blaze-builder needs) fairly<br>
> simply from this. Little-endian only ATM, but BE could be added if<br>
> necessary.<br>
<br>
</div>Good to know that! However, I think for the original poster the binary<br>
package is perfect. This way he does not worry about unsafe peeking and<br>
poking around in memory.<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div><br></div><div>Yes. I have came back to looking at the binary package, the only thing is I think I have to build my own primatives with it as it is big-endian, where ActionScript Byte Code format is little-endian. It does provide some little-endian functions but they are not brought to the surface. It also seems to roll its own serializations.</div>
<div><br></div><div>I am maybe looking at doing my own specialized set of types and binary backend as there are drawback with each of the existing solutions. </div><div><br></div><div> - Data.Storable.Endian - peeks and pokes rather than put/get</div>
<div> - Data.Word24 - peeks and pokes rather than put/get</div><div> - Data.Binary - big-endian</div><div><br></div><div>ABC format may best be supported by a specific set of serialization types.</div><div><br></div><div>
On a different note thinking outside this problem, I would like IO_LE and IO_BE types if that could be make to work.</div><div><br></div><div>Aaron</div><div><br></div></div>