Remove DecompMgr in favor of a much simpler fn ptr.

Moved more functionality to Inode instead of File.
Started doing some optimization around allocation.
Slight rework of ExtractionOptions.
This commit is contained in:
Caleb J. Gardner
2026-02-07 05:04:22 -06:00
parent a316ba569f
commit 75502da1d0
10 changed files with 299 additions and 539 deletions
+15 -10
View File
@@ -5,16 +5,21 @@ const Writer = std.Io.Writer;
const ExtractionOptions = @This();
/// Don't set the file's permissions after extraction
ignorePermissions: bool = false,
/// Don't set the file's owner after extraction.
ignoreOwner: bool = false,
/// Don't set the file's owner & permissions after extraction
ignore_permissions: bool = false,
/// Don't set xattr values. Currently xattrs are never set anyway.
ignore_xattr: bool = false,
/// Replace symlinks with their target.
dereferenceSymlinks: bool = false,
log_level: std.log.Level = .err,
// /// If options verbose and verboseWriter not set, logs are printed to stdout.
// verboseWriter: ?*Writer = null,
dereference_symlinks: bool = false,
/// Verbose logging. If true, verbose_writer must be set
verbose: bool = false,
/// Where to print verbose log.
verbose_writer: ?*Writer = null,
pub const Default: ExtractionOptions = .{};
pub const VerboseDefault: ExtractionOptions = .{ .log_level = .debug };
pub fn VerboseDefault(wrt: *Writer) ExtractionOptions {
return .{
.verbose = true,
.verbose_writer = wrt,
};
}