Skip to main content

Function: encodePeaks()

function encodePeaks(peaks, options?): ArrayBuffer;

Defined in: peaks.ts:132

Serializes peaks into a compact binary buffer, e.g. to cache them on disk or send them from a server. Decode with decodePeaks.

bitsbytes per bucket and channelmax error
83≈ 0.008 near full scale, less for quiet values
166≈ 0.00002
3212lossless

Parameters​

ParameterType
peaksPeaks
options?EncodePeaksOptions

Returns​

ArrayBuffer