Fixed a couple decompressor issues.

Re-added ExtractionOptions
This commit is contained in:
Caleb J. Gardner
2026-04-03 22:27:40 -05:00
parent 4ee15b036a
commit d0787a5200
14 changed files with 101 additions and 60 deletions
+2 -5
View File
@@ -11,8 +11,8 @@ pub const Error = error{
const Decompressor = @This();
alloc: std.mem.Allocator = std.heap.page_allocator,
vtable: *struct {
alloc: std.mem.Allocator = std.heap.smp_allocator,
vtable: *const struct {
decompress: *const fn (*const Decompressor, in: []u8, out: []u8) Error!usize = defaultDecompress,
stateless: StatelessDecomp,
},
@@ -20,9 +20,6 @@ vtable: *struct {
pub fn decompress(self: *const Decompressor, in: []u8, out: []u8) Error!usize {
return self.vtable.decompress(self, in, out);
}
pub fn stateless(self: Decompressor, alloc: std.mem.Allocator, in: []u8, out: []u8) Error!usize {
return self.vtable.stateless(alloc, in, out);
}
fn defaultDecompress(self: *const Decompressor, in: []u8, out: []u8) Error!usize {
return self.vtable.stateless(self.alloc, in, out);