README

hustcer/fbr/decode does not have a README file

#
UnbrotliOptions

pub(all) struct UnbrotliOptions {
out : FixedArray[Byte]?
max_output_size : Int
max_input_size : Int
} derive(
Debug
)

Options for Brotli decompression.

out lets callers provide a reusable output buffer. The buffer must fit the full decompressed payload when supplied. The Brotli decoder may allocate a ring buffer up to 1 << window_bits from the stream header; the default max_output_size still caps the final output returned by the sync API.

#
UnbrotliOptions::default

Return the default Brotli decompression options.

#
UnbrotliStream

pub(all) struct UnbrotliStream {
ondata :
FbrStreamHandler
?
// private fields
}

Incremental Brotli decompressor.

Input chunks are decoded as soon as complete Brotli meta-blocks are available. Produced chunks are emitted through ondata.

#
UnbrotliStream::new

Create a Brotli decompression stream.

#
UnbrotliStream::push

fn UnbrotliStream::push(self : UnbrotliStream, chunk : FixedArray[Byte], final_? : Bool) -> Unit raise
FbrError

Push one input chunk into the Brotli decompression stream.

#
UnbrotliStream::set_ondata

fn UnbrotliStream::set_ondata(self : UnbrotliStream, handler : (FixedArray[Byte], Bool) -> Unit) -> Unit

Set the output callback for a Brotli decompression stream.

#
unbrotli_sync

fn unbrotli_sync(data : FixedArray[Byte], opts? : UnbrotliOptions) -> FixedArray[Byte] raise
FbrError

Decompress a Brotli stream.

This public entry point enforces fzip's input and output caps and returns a freshly trimmed output buffer. The RFC 7932 decoder is being filled in behind this API with each intermediate path still reporting unsupported or malformed Brotli constructs as @common.FbrError.

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io