Finished an initial version of extraction

It works, but is very slow.
This commit is contained in:
Caleb Gardner
2026-05-21 05:07:02 -05:00
parent 69ce562b6c
commit d1d453ac29
7 changed files with 276 additions and 64 deletions
+3 -1
View File
@@ -3,6 +3,8 @@ const Reader = std.Io.Reader;
const Inode = @import("inode.zig");
pub const Error = error{OutOfMemory} || Reader.Error;
const DirEntry = @This();
block_start: u32,
@@ -14,7 +16,7 @@ pub fn deinit(self: DirEntry, alloc: std.mem.Allocator) void {
alloc.free(self.name);
}
pub fn readDirectory(alloc: std.mem.Allocator, rdr: *Reader, size: u32) ![]DirEntry {
pub fn readDirectory(alloc: std.mem.Allocator, rdr: *Reader, size: u32) Error![]DirEntry {
var hdr: Header = undefined;
var raw: RawEntry = undefined;
var out: std.ArrayList(DirEntry) = try .initCapacity(alloc, 30);