Zstandard window size
Zstandard window size is a frame parameter that bounds references into previously decoded frame data and determines decoding-history requirements.
Header: An ordinary frame encodes Window_Size through a window descriptor. In a single-segment frame, the descriptor is absent and Window_Size equals Frame_Content_Size. Window size in bytes is distinct from the logarithmic windowLog setting. [1]
Scope: The window is not a limit on total decoded output. A stream can contain many blocks or concatenate frames while requiring only bounded decoding history. [1]
API boundary: In the pinned library API, ZSTD_d_windowLogMax limits streaming-window allocation and does not apply to single-pass decompression. It is not an exact process-wide memory ceiling. The separate CLI probe accepted 2 MiB and 4 MiB outputs under -M1MiB with small windows. [2] [3]
Relations
Citations
- RFC 8878: frames and Window Descriptor, sections 3.1 and 3.1.1.1.2
- Zstandard v1.5.7 API manual: frame content size and ZSTD_d_windowLogMax
- Hesela: Zstandard decoder windows versus decoded-output budgets
Sources & caveats
- General file-format and v1.5.7 API scope; no HTTP content-coding limits are inferred.
- CLI measurements use Zstandard 1.5.5 with synthetic data and do not measure resident memory or direct API calls.