Fleshing out more of the library.

Mainly adding functions to File
This commit is contained in:
Caleb J. Gardner
2026-04-07 15:41:30 -05:00
parent eec468ff17
commit 3e97aabe53
9 changed files with 371 additions and 43 deletions
+5
View File
@@ -17,6 +17,11 @@ vtable: *const struct {
stateless: StatelessDecomp,
},
/// Create a copy of the decompressor using it's stateless function and the new allocator.
pub fn statelessCopy(self: Decompressor, alloc: std.mem.Allocator) Decompressor {
return &.{ .alloc = alloc, .vtable = &.{ .stateless = self.vtable.stateless } };
}
pub fn decompress(self: *const Decompressor, in: []u8, out: []u8) Error!usize {
return self.vtable.decompress(self, in, out);
}