Is there a way to read the files within an .epub. I've tried using std.tar but unsure if I'm doing it right. I also looked into std.zip but didn't see a way to iterate through them. Any help would be greatly appreciated.
I guess what I really need is to iterate over directory items from a zip file
const file = try std.fs.openFileAbsolute(path, .{ .mode = .read_only });
defer file.close();
var file_name_buf: [std.fs.max_path_bytes]u8 = undefined;
var link_name_buf: [std.fs.max_path_bytes]u8 = undefined;
var iter = std.tar.iterator(file.reader(), .{ .file_name_buffer = &file_name_buf, .link_name_buffer = &link_name_buf });
while (try iter.next()) |item| {
std.debug.print("{s}", .{item.name});
}