Something went wrong. Try again.
Brotli (RFC 7932) compression and decompression for Zig 0.17, with sans-I/O streaming cores and std.Io adapters.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us>// SPDX-License-Identifier: MIT
//! What a streaming coder reports after each call.//!//! The compressor and the decompressor both use these, so that a program//! driving either one drives it the same way: hand over some input and some//! room for output, and act on the status that comes back.
/// Why a call returned.pub const Status = enum { /// Every byte of input was consumed, and more is needed to go on. need_input, /// The output buffer is full, and there is more to write. need_output, /// The stream is complete and all of it has been written. done,};
/// What a call did.pub const Result = struct { /// How many bytes of the input were consumed. Any not consumed must be /// passed again on the next call. read: usize, /// How many bytes of the output buffer were filled, from its start. written: usize, status: Status,};