Function appendLiteral [src]

Append a literal

Prototype

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

Parameters

self: *Selfallocator: Allocatorlit: u8

Source

pub fn appendLiteral( self: *Self, allocator: Allocator, lit: u8, writer: anytype, ) !void { try self.set(allocator, self.cursor, lit); self.cursor += 1; self.len += 1; // Flush the circular buffer to the output if (self.cursor == self.dict_size) { try writer.writeAll(self.buf.items); self.cursor = 0; } }