[Haskell-cafe] Re: fgetc and fputc equivalents

Antoine Latter aslatter at gmail.com
Wed Dec 9 14:54:09 EST 2009


On Wed, Dec 9, 2009 at 11:33 AM, John D. Earle <JohnDEarle at cox.net> wrote:
> My interest isn't actually to push around characters. I do enough of that.
> What I really want to do is push bits and not bytes.

I thought that fgetc and fputc worked on bytes, not bits?

I've had great luck using the binary package to produce structured
binary data. If it's overkill for what you're trying to do then I
recommend the bytestring package.

See:

http://hackage.haskell.org/package/binary
http://hackage.haskell.org/package/bytestring

Antoine


More information about the Haskell-Cafe mailing list