zoom-cache-0.3.0.0: A streamable, seekable, zoomable cache file format

Portabilityunknown
Stabilityunstable
MaintainerConrad Parker <conrad@metadecks.org>

Data.ZoomCache.Codec

Contents

Description

Interface for implementing ZoomCache codec instances. This module re-exports the interfaces required for developing zoom-cache codecs.

For sample implementations, read the source of the provided instances Data.ZoomCache.Int and Data.ZoomCache.Double.

Synopsis

Interfaces

class ZoomWrite t whereSource

The ZoomWrite class provides write, a method to write a Haskell value to an open ZoomCache file.

Methods

write :: TrackNo -> t -> ZoomW ()Source

Write a value to an open ZoomCache file.

ZoomCache Types

Raw data iteratees

Binary data helpers

fromRational64 :: Rational -> BuilderSource

Serialize a Rational as a sequence of two 64bit big endian format integers.

fromIntegral32be :: forall a. Integral a => a -> BuilderSource

Serialize an Integral in 32bit big endian format.

fromDouble :: Double -> BuilderSource

Serialize a Double in big-endian IEEE 754-2008 binary64 format (IEEE 754-1985 double format).

Write instance helpers