| ... | ... | @@ -10,6 +10,7 @@ const u = @import("index.zig"); |
| 10 | 10 | pub const b = 1; |
| 11 | 11 | pub const kb = b * 1024; |
| 12 | 12 | pub const mb = kb * 1024; |
| 13 | pub const gb = mb * 1024; |
| 13 | 14 | |
| 14 | 15 | pub fn print(comptime fmt: []const u8, args: anytype) void { |
| 15 | 16 | std.debug.print(fmt++"\n", args); |
| ... | ... | @@ -263,7 +264,7 @@ pub fn validate_hash(input: []const u8, file_path: []const u8) !bool { |
| 263 | 264 | const hash = parse_split(HashFn, "-").do(input) catch return false; |
| 264 | 265 | const file = try std.fs.cwd().openFile(file_path, .{}); |
| 265 | 266 | defer file.close(); |
| 266 | | const data = try file.reader().readAllAlloc(gpa, mb); |
| 267 | const data = try file.reader().readAllAlloc(gpa, gb); |
| 267 | 268 | return std.mem.eql(u8, hash.string, switch (hash.id) { |
| 268 | 269 | .blake3 => blk: { |
| 269 | 270 | const h = &std.crypto.hash.Blake3.init(.{}); |