Fixed missed merge text (oops)

Changed all *const Decompressor to *Decompressor
Changed all decompressors to only stateless (my queues are borked)
This commit is contained in:
Caleb Gardner
2026-05-24 15:26:37 -05:00
parent a9e50a0ff5
commit 1a8838b544
27 changed files with 120 additions and 233 deletions
+2 -2
View File
@@ -47,7 +47,7 @@ pub fn deinit(self: *Self) void {
self.alloc.free(self.buf);
}
fn decomp(d: ?*const Decompressor, alloc: std.mem.Allocator, in: []u8, out: []u8) Error!usize {
fn decomp(d: ?*Decompressor, alloc: std.mem.Allocator, in: []u8, out: []u8) Error!usize {
if (d == null) {
return statelessDecomp(d, alloc, in, out);
}
@@ -70,7 +70,7 @@ inline fn zlibDecomp(buffer: []u8, in: []u8, out: []u8) !usize {
pub const stateless_decompressor: Decompressor = .{ .decomp_fn = statelessDecomp };
fn statelessDecomp(_: ?*const Decompressor, alloc: std.mem.Allocator, in: []u8, out: []u8) Error!usize {
fn statelessDecomp(_: ?*Decompressor, alloc: std.mem.Allocator, in: []u8, out: []u8) Error!usize {
const buf = try alloc.alloc(u8, out.len);
defer alloc.free(buf);
return zlibDecomp(buf, in, out);