Started re-write (once again)

Main reason for this re-write is to be compatible with zig 0.16.0
This commit is contained in:
Caleb Gardner
2026-04-29 03:48:34 -05:00
parent 4b2b7021c7
commit b67d02074d
31 changed files with 238 additions and 2598 deletions
+4 -4
View File
@@ -1,8 +1,8 @@
//! A File where it's meaningful (to us) content starts at a given offset.
const std = @import("std");
const File = std.fs.File;
const Reader = std.fs.File.Reader;
const File = std.Io.File;
const Reader = File.Reader;
const OffsetFile = @This();
@@ -13,8 +13,8 @@ pub fn init(fil: File, init_offset: u64) OffsetFile {
return .{ .fil = fil, .offset = init_offset };
}
pub fn readerAt(self: OffsetFile, offset: u64, buffer: []u8) !Reader {
var rdr = self.fil.reader(buffer);
pub fn readerAt(self: OffsetFile, io: std.Io, offset: u64, buffer: []u8) !Reader {
var rdr = self.fil.reader(io, buffer);
try rdr.seekTo(self.offset + offset);
return rdr;
}