// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie // 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, };