|(require binary-class/riff)||package: binary-class-riff|
This module provides utilities for reading and writing RIFF files.
in : input-port? = (current-input-port) (read-riff in dispatch) → (is-a?/c riff%) in : input-port? dispatch : (-> bytes? (or/c (subclass?/c riff%) #f))
Reads RIFF data from in and returns it. If dispatch is supplied, it must be a procedure accepting a four-byte chunk ID, and returning a subclass of riff% or #f if no special handling is required.
v : (is-a?/c riff%) out : output-port? = (current-output-port)
Writes the RIFF object v to out.
The base type for all RIFF data.
Represents a raw chunk.
Represents a list chunk.
(new riff:list% [type type] [chunks chunks] ...superclass-args...) → (is-a?/c riff:list%) type : bytes? chunks : (listof (is-a?/c riff%))Returns the first sub-chunk with ID matching id. If multiple ids are supplied, they refer to nested sub-chunks.
A binary type for reading chunk IDs.
Returns a binary type based on type, with padding to the nearest word.