From 5be59be2205a4116fd641122170401acd4e79b35 Mon Sep 17 00:00:00 2001 From: Caleb Gardner Date: Wed, 28 May 2025 02:49:53 -0500 Subject: [PATCH] Increase buffer size for decompressTo --- README.md | 2 +- src/decompress.zig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 821e526..fec15fd 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ Messing around with zig via making a squashfs library. May amount to something. ## Current state -Everything seems to be working now, but performance is absolutely garbage. +Performance is pretty terrible, but overall the library should fully work for decompression. Lzo & Lz4 decompression are not supported as they are not a part of zig's stdlib (support may be added later with external libraries). diff --git a/src/decompress.zig b/src/decompress.zig index 71424c6..d35a355 100644 --- a/src/decompress.zig +++ b/src/decompress.zig @@ -45,7 +45,7 @@ pub const DecompressType = enum(u16) { } pub fn decompressTo(self: DecompressType, alloc: std.mem.Allocator, rdr: io.AnyReader, writer: io.AnyWriter) anyerror!void { - const buf_size: usize = 1024; + const buf_size: usize = 8192; switch (self) { .zlib => try compress.zlib.decompress(rdr, writer), .lzma => {