Personal tools

Binary IO

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
m (Added link to DealingWithBinaryData)
m (link to serTH in internet archive)

Revision as of 23:25, 23 April 2010

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

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.