An accumulating buffer for LZ sequences

Fields

Buffer

memlimit: usize,

Buffer memory limit

len: usize,

Total number of bytes sent through the buffer

Functions

fn appendByte(self: *Self, allocator: Allocator, byte: u8) !void

No documentation provided.

fn appendLiteral(self: *Self, allocator: Allocator, lit: u8, writer: anytype) !void

Append a literal

fn appendLz(self: *Self, allocator: Allocator, len: usize, dist: usize, writer: anytype) !void

Fetch an LZ sequence (length, distance) from inside the buffer

fn deinit(self: *Self, allocator: Allocator) void

No documentation provided.

fn finish(self: *Self, writer: anytype) !void

No documentation provided.

fn init(memlimit: usize) Self

No documentation provided.

fn lastN(self: Self, dist: usize) !u8

Retrieve the n-th last byte

fn lastOr(self: Self, lit: u8) u8

Retrieve the last byte or return a default

fn reset(self: *Self, writer: anytype) !void

Reset the internal dictionary