DoxigAlpha

init

Function parameters

Parameters

#
output:*Writer
buffer:[]u8

Type definitions in this namespace

Types

#
Level
Trades between speed and compression size.

Functions in this namespace

Functions

#

Number of tokens to accumulate in deflate before starting block encoding.

Values

#
n_tokens
Number of tokens to accumulate in deflate before starting block encoding.

Source

Implementation

#
pub fn init(output: *Writer, buffer: []u8, container: Container, strategy: Strategy) !Simple {
    const header = container.header();
    try output.writeAll(header);
    return .{
        .buffer = buffer,
        .wp = 0,
        .block_writer = .init(output),
        .hasher = .init(container),
        .strategy = strategy,
    };
}