riff-0.3.0.0: RIFF parser for Haskell

Copyright(c) Robert Massaioli, 2014
LicenseMIT
Maintainerrobertmassaioli@gmail.com
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Riff.Operations

Description

This module provides some common operations that you might like to perform on RIFF files. This is by no means an exhaustive list but you may find it useful. This is meant to be a collection of common methods to make your development time shorter.

Synopsis

Documentation

calculateFileLength :: RiffFile -> RiffChunkSize Source

Calculates the size that should be in the ChunkSize location of the RiffFile when it has been written out to disk. If you want to get the true file size of a Riff file once it has been written out to disk then you need to use the trueFileSize function.

calculateChunkLength Source

Arguments

:: RiffChunk

The RIFF chunk whose size should be calculated.

-> RiffChunkSize

The size of the data portion of that chunk no disk.

Calculates the size of this chunk such that you could place that size in the ChunkSize section of that chunk in a RIFF file that you wrote to disk.

trueFileSize Source

Arguments

:: RiffFile

The RIFF file that needs its size calculated.

-> Integer

The size of the RIFF file if it was written to disk.

This function calculates the size of the RIFF file if it was written out to disk.