[Haskell-cafe] two problems with Data.Binary and Data.ByteString

Tim Newsham newsham at lava.net
Thu Aug 14 17:32:00 EDT 2008


>> Maybe it makes sense to have the streamble list instance in Binary as
>> well, with some examples?

> Chunk = {
>    length :: Word8
>    elems :: [Elem]  --  0..255 repetitions
>  }
> Chunks = [Chunk] -- terminated with the first 0 length Chunk

I tried my hand at the encoding above:

     http://www.thenewsh.com/%7Enewsham/store/test10.hs

it seems to work, although it doesn't seem to be very efficient.
I'm getting very large memory growth when I was hoping it
would be lazy and memory efficient...  What's leaking?

>> -- Don

Tim Newsham
http://www.thenewsh.com/~newsham/


More information about the Haskell-Cafe mailing list