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

Portabilityunknown
Stabilityunstable
MaintainerConrad Parker <conrad@metadecks.org>
Safe HaskellSafe-Infered

Data.ZoomCache.Unit

Description

Default codec implementation for values of type (). Elements of type () are useful for marking events, and variable rate tracks written with type (SampleOffset, ()) are useful for recording times of events.

This module implements the interfaces documented in Data.ZoomCache.Codec.

As elements of type () contain no unique information it is sufficient to record only a count of elements which occur within each packet.

No raw data is encoded for tracks of type () as the raw data packet header already includes a count of elements. This is implemented by specifying const mempty) as the Builder and (return ()) as the reader.

The table below describes the encoding of SummaryData for ().

   | ...                                                           |   -35
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Count (int32)                                                 | 36-39
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Field encoding formats:

int32: 32bit big endian