OpenAFP-1.3: IBM AFP document format parser and generator

Portabilitynon-portable (GHC-only)
Stabilityexperimental
Maintaineraudreyt@audreyt.org

OpenAFP.Types.Buffer

Description

This module handles sized binary buffers.

Synopsis

Documentation

class (Show a, Typeable a) => Buf a whereSource

The Buf class represents buffers, with the leading bytes representing its length.

Methods

mkBuf :: BS -> aSource

packBuf :: a -> BSSource

newtype Buffer0 Source

Buffer0, being a simple BS, is of unlimited length.

Constructors

Buf0 

Fields

fromBuf0 :: BS
 

newtype Buffer1 Source

Buffer1 uses one byte as length, hence is at most 254 bytes long.

Constructors

Buf1 

Fields

fromBuf1 :: BS
 

newtype Buffer2 Source

Buffer2 uses two bytes; it can store up to 65535 bytes.

Constructors

Buf2 

Fields

fromBuf2 :: BS