Fixed threads == 0 causing single threaded extraction.

Set exclusive file creation
This commit is contained in:
Caleb J. Gardner
2026-02-12 05:08:16 -06:00
parent 567dea8a0b
commit 48f4235875
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ pub fn initAdvanced(alloc: std.mem.Allocator, fil: File, offset: u64, threads: u
.parent_alloc = alloc,
.alloc = .{ .child_allocator = alloc },
// .fixed_buf = fixed_buf,
.thread_count = threads,
.thread_count = if (threads > 0) threads else try std.Thread.getCpuCount(),
.fil = .init(fil, offset),
.decomp = switch (super.compression) {
.gzip => Decomp.gzipDecompress,