Fixed a couple decompressor issues.
Re-added ExtractionOptions
This commit is contained in:
+2
-5
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user