This module provides various helpful utilities for dealing with binary
input and output.

You can use this module to deal with binary blocks of data as either Strings
or lists of Word8. The BinaryConvertible class provides this abstraction.

Wherever you see HVIO, you can transparently substite a regular Handle.
This module can work with any HVIO object, however. See
System.IO.HVIO for more details.

Versions of MissingH prior 0.11.6 lacked the BinaryConvertible class
and worked only with Strings and Handles.

Important note: /binary functions are not supported in all Haskell
implementations/. Do not import or use this module unless you know you
are using an implementation that supports them. At this time, here
is the support status:

Disk File Data Copying

Please note that the Unix permission bits on the output file cannot
be set due to a limitation of the Haskell openBinaryFile
function. Therefore, you may need to adjust those bits after the copy
yourself.

Binary Single-Block I/O

As a wrapper around the standard function hPutBuf,
this function takes a standard Haskell String instead of the far less
convenient Ptr a. The entire contents of the string will be written
as a binary buffer using hPutBuf. The length of the output will be
the length of the passed String or list.

If it helps, you can thing of this function as being of type
Handle -> String -> IO ()

Acts a wrapper around the standard function hGetBuf,
this function returns a standard Haskell String (or [Word8]) instead of
modifying
a 'Ptr a' buffer. The length is the maximum length to read and the
semantice are the same as with hGetBuf; namely, the empty string
is returned with EOF is reached, and any given read may read fewer
bytes than the given length.

Binary Block-based

Binary block-based interaction. This is useful for scenarios that
take binary blocks, manipulate them in some way, and then write them
out. Take a look at hBlockCopy for an example. The integer argument
is the size of input binary blocks. This function uses hGetBlocks
internally.