OpenAFP-1.3.2: IBM AFP document format parser and generator

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

OpenAFP.Types.Buffer

Description

This module handles sized binary buffers.

Synopsis

Documentation

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

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

Methods

mkBuf :: BS -> a

packBuf :: a -> BS

newtype Buffer0

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

Constructors

Buf0 

Fields

fromBuf0 :: BS
 

newtype Buffer1

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

Constructors

Buf1 

Fields

fromBuf1 :: BS
 

newtype Buffer2

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

Constructors

Buf2 

Fields

fromBuf2 :: BS