NewBinary on Ptrs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

NewBinary on Ptrs

J. Pablo Fernández
Hello,
After trying my own code and reading the whole thread I started to understand
NewBinary. I'm going to give it a try.
My question now is how to turn a Ptr into a BinHandle to use NewBinary on it,
or is there another way to do it ?
Thanks.
--
Pupeno <[hidden email]> (http://pupeno.com)

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NewBinary on Ptrs

Bulat Ziganshin
Hello Pupeno,

Wednesday, December 28, 2005, 6:27:54 AM, you wrote:

P> My question now is how to turn a Ptr into a BinHandle to use NewBinary on it,
P> or is there another way to do it ?

no. you need to write this self. see at implementation of readBinMem,
it's closest code to what you need

afair, Jeremy uses BE order for bytes, but LE order for bits inside
bytes. but i'm not sure - test his library on parsing your real data


--
Best regards,
 Bulat                            mailto:[hidden email]



_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe