A circular buffer for LZ sequences

Fields

Circular buffer

dict_size: usize,

Length of the buffer

memlimit: usize,

Buffer memory limit

cursor: usize,

Current position

len: usize,

Total number of bytes sent through the buffer

Functions

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 get(self: Self, index: usize) u8

No documentation provided.

fn init(dict_size: usize, 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 set(self: *Self, allocator: Allocator, index: usize, value: u8) !void

No documentation provided.