[Byte8] <-> ByteString

Hello, I have been reading through Data->ByteString. What is the is most elegant and efficient way to map/unmap [Byte8] <-> ByteString? Thanks, Vasili

2008/12/22 Galchin, Vasili
Hello,
I have been reading through Data->ByteString. What is the is most elegant and efficient way to map/unmap [Byte8] <-> ByteString?
pack and unpack. You might need a fromIntegral in there, depending on whether Byte8 and Word8 are the same. Luke

sorry actually ByteString -> [Word8]....
On Tue, Dec 23, 2008 at 12:49 AM, Luke Palmer
2008/12/22 Galchin, Vasili
Hello,
I have been reading through Data->ByteString. What is the is most elegant and efficient way to map/unmap [Byte8] <-> ByteString?
pack and unpack. You might need a fromIntegral in there, depending on whether Byte8 and Word8 are the same.
Luke

On Tue, 2008-12-23 at 00:34 -0600, Galchin, Vasili wrote:
Hello,
I have been reading through Data->ByteString. What is the is most elegant and efficient way to map/unmap [Byte8] <-> ByteString?
Hoogle is your friend! http://haskell.org/hoogle/ [Word8] -> ByteString http://haskell.org/hoogle/?hoogle=%5BWord8%5D+-%3E+ByteString ByteString -> [Word8] http://haskell.org/hoogle/?hoogle=ByteString+-%3E+%5BWord8%5D Duncan
participants (3)
-
Duncan Coutts
-
Galchin, Vasili
-
Luke Palmer