How Simple API and Streaming API differ
developThe library provides two primary ways to interact with Zstandard:
- Simple API: Best for small data. It requires storing the entire input and output in Emscripten's heap. The total size of
(input.length + output.length)should be less than 12MiB to avoid exceeding the available heap limits. - Streaming API: Best for large data. It allows storing only partial input/output bytes in the Emscripten heap, making it suitable for processing data larger than the heap limits.