pub fn appendLiteral( self: *CircularBuffer, gpa: Allocator, lit: u8, writer: *Writer, ) !void
Append a literal
self: *CircularBuffer
gpa: Allocator
lit: u8
writer: *Writer
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409
pub fn appendLiteral( self: *CircularBuffer, gpa: Allocator, lit: u8, writer: *Writer, ) !void { try self.set(gpa, 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; } }
Append a literal