
8 Feb
2011
8 Feb
'11
4:39 a.m.
1) Just use Data.Word.Word8 instead of the second Int in your type sig for IOArray 2) Use getElems to get a [Word8] 3) Data.ByteString.pack converts a [Word8] into a ByteString
Michael
I am currently using a list of tuples - [(Int,Int,Int)] to represent an image buffer. You can see it in the getImageByteString function at https://github.com/ckkashyap/Chitra/blob/master/RFB/Encoding.hs Looks like this is pretty slow, and hence I am exploring Arrays. I wonder if working with [Word8] will also suffer from performance hit? Regards, Kashyap