<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5"><br>
</div></div>1) Just use Data.Word.Word8 instead of the second Int in your type sig<br>
for IOArray<br>
2) Use getElems to get a [Word8]<br>
3) Data.ByteString.pack converts a [Word8] into a ByteString<br>
<font color="#888888"><br>
Michael<br>
</font></blockquote></div><br><div>I am currently using a list of tuples - [(Int,Int,Int)] to represent an image buffer. You can see it in the <span class="Apple-style-span" style="color: rgb(153, 0, 0); font-family: &#39;Bitstream Vera Sans Mono&#39;, Courier, monospace; font-size: 12px; font-weight: bold; line-height: 17px; white-space: pre; ">getImageByteString</span></div>
<meta charset="utf-8"><div>function at <a href="https://github.com/ckkashyap/Chitra/blob/master/RFB/Encoding.hs">https://github.com/ckkashyap/Chitra/blob/master/RFB/Encoding.hs</a></div><div>Looks like this is pretty slow, and hence I am exploring Arrays.</div>
<div><br></div><div>I wonder if working with [Word8] will also suffer from performance hit?</div><div><br></div><div>Regards,</div><div>Kashyap</div>