Files
zig-squashfs/squashfs.zig
T
Caleb Gardner 58e89c0981 Initial commit
2025-05-11 09:39:24 -05:00

17 lines
373 B
Zig

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,
};
}