Initial commit

This commit is contained in:
Caleb Gardner
2025-05-11 09:39:24 -05:00
parent ad7aa271ea
commit 58e89c0981
7 changed files with 199 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
const std = @import("std");
const io = std.io;
const Superblock = @import("superblock.zig").Superblock;
pub const Reader = struct {
super: Superblock,
rdr: io.AnyReader,
};
pub fn newReader(rdr: io.AnyReader) !Reader {
const super = try rdr.readStruct(Superblock);
try super.valid();
return Reader{
.super = super,
.rdr = rdr,
};
}