[Haskell-cafe] convert a list of booleans into Word*

Andrew Coppin andrewcoppin at btinternet.com
Wed Sep 30 06:02:41 EDT 2009

Paul.Brauner at loria.fr wrote:
> (If it helps, i'm writting a toy compression algorithm, which outputs
> binary as lists of booleans, and I'd like to output that in a file).

By a strange coincidence, I did the self same thing a while back.

There is Data.Binary which supports efficient reading and writing of 
binary data. However, sadly it does not support bit alignment, only 
whole byte alignment. I did put together a library to fix this, but I 
don't have the source code any more. Maybe I should finish it and put it 
on Hackage...

More information about the Haskell-Cafe mailing list