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.
| bits | bytes per bucket and channel | max error |
|---|---|---|
| 8 | 3 | ≈ 0.008 near full scale, less for quiet values |
| 16 | 6 | ≈ 0.00002 |
| 32 | 12 | lossless |
Parameters
| Parameter | Type |
|---|---|
peaks | Peaks |
options? | EncodePeaksOptions |
Returns
ArrayBuffer