HaskellWiki

Haskell | Wiki community | Recent changes
Random page | Special pages

 

Not logged in
Log in | Help

Binary IO

Categories: Tutorials

1 Data.Binary

There are a number of binary I/O libraries available for Haskell. The best to use is the new, semi-standard Data.Binary library:

   * Data.Binary

It's very simple to use, and provides a highly efficient, pure interface to binary serialisation.

A tutorial:

   * Serialisation_and_compression_with_Data_Binary

See also DealingWithBinaryData

2 Other libraries

For very simple serialisation, use read and show.

If you have simple binary IO requirements, then Data.ByteString might be easiest -- you get a List-like interface to packed byte arrays (interface documented here). For more complex serialisation, Data.Binary would be preferred.

Retrieved from "http://www.haskell.org/haskellwiki/Binary_IO"

This page has been accessed 2,539 times. This page was last modified 14:14, 27 May 2008. Recent content is available under a simple permissive license.