Scoop API

scoop:scoop.compression:0.1.0

scoop.compression

API

  • enum BrotliMode

    The content model used by the Brotli encoder.

  • class BrotliOptions

    Brotli quality, window size, and content mode; invalid values fail at codec construction.

  • class CompressionDecoder

    A stateful incremental decoder for one explicitly selected format. It validates framing and configured limits while advancing caller-owned buffers.

  • class CompressionDictionary

    Owned native dictionary bytes for zstd. Construction copies the supplied bytes; close the dictionary after it is no longer needed for codec construction.

  • class CompressionEncoder

    A stateful incremental encoder using caller-owned input and output buffers. Drain flush/finish until their operation completes; close releases native state without completing a stream.

  • class CompressionException

    A codec failure retaining format, operation, reason, backend code, and diagnostic detail.

  • enum CompressionFailureKind

    The codec-level reason for a failed compression or decompression operation.

  • enum CompressionFormat

    The explicit compressed wire format. Decoding does not guess the format from input.

  • enum CompressionOptions

    A format and its matching encoder settings; generic compression defaults to zstd.

  • class CompressionSink

    A synchronous compression sink adapter with bounded buffering. The ordinary constructor borrows its endpoint; takeOwnership also assumes endpoint close responsibility. Call finish for successful completion; close alone does not finish the format.

  • class CompressionSource

    A synchronous compression source adapter with bounded buffering. The ordinary constructor borrows its endpoint; takeOwnership also assumes endpoint close responsibility. Reading to EOF completes format validation; early close does not.

  • enum CompressionState

    The next action required by an incremental codec after consuming and producing the reported byte counts.

  • struct CompressionStep

    Actual input bytes consumed, output bytes produced, and the next required codec action for one call.

  • struct CompressionTotals

    Cumulative actual input and output byte counts, not buffer capacities or requested counts.

  • enum DecompressionMode

    Controls frame/member boundaries within the selected format; Automatic does not detect the format.

  • class DecompressionOptions

    An explicit decoder format with optional output/window limits and dictionary. Dictionary and window-limit support belong to zstd.

  • class DecompressionSink

    A synchronous decompression sink adapter with bounded buffering. The ordinary constructor borrows its endpoint; takeOwnership also assumes endpoint close responsibility. Call finish for successful completion; close alone does not finish the format.

  • class DecompressionSource

    A synchronous decompression source adapter with bounded buffering. The ordinary constructor borrows its endpoint; takeOwnership also assumes endpoint close responsibility. Reading to EOF completes format validation; early close does not.

  • class DeflateMessageDecoder

    An RFC 7692 message decoder with explicit boundaries, window size, context takeover, and optional output limit.

  • class DeflateMessageEncoder

    An RFC 7692 message encoder with explicit message boundaries and context-takeover selection. Finish each message before starting the next.

  • class DeflateOptions

    DEFLATE compression level, window bits, and strategy for zlib or raw DEFLATE. Invalid combinations fail during codec construction.

  • enum DeflateStrategy

    The DEFLATE backend's match and entropy-coding strategy.

  • class GzipMetadata

    Optional gzip header metadata with copied filename/comment byte arrays. This metadata does not change the uncompressed payload.

  • class GzipOptions

    DEFLATE parameters and gzip header metadata for a gzip member.

  • class ZstdOptions

    Zstandard level, frame checksum selection, and optional dictionary. The default is level 3 with checksum enabled.

  • function compress

    Compresses a complete byte sequence, finishing the format and returning independently owned result bytes.

  • function compressTo

    Copies a byte source through an encoder into the destination, finishes it, and returns actual byte totals. The source and destination remain borrowed.

  • function compressionBackendVersion

    Returns the linked backend version for the requested wire format.

  • function decompress

    Decodes a complete byte sequence in the selected format. Truncation, configured limits, and unconsumed trailing bytes are errors.

  • function decompressTo

    Copies and validates a complete compressed stream into the destination, returning actual byte totals. The source and destination remain borrowed.