Last active
April 22, 2024 00:56
-
-
Save nektro/d371537cf3208d535c63508638e5d4a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Archive = struct { | |
magic: [4]u8 = [_]u8{ 'q', 'o', 'z', 1 }, | |
files_count: u32, | |
files: [*]File, | |
}; | |
const File = struct { | |
flags: Flags, | |
data_length: u64, | |
data_length_uncompressed: u64, | |
mtime: u64, | |
ctime: u64, | |
name_bytes: [*]u8, | |
data_bytes: [*]u8, | |
}; | |
const Flags = packed struct(u16) { | |
kind: enum(u1) { file, symlink }, | |
compression: enum(u4) { | |
none, | |
gzip, | |
zstd, | |
_, | |
}, | |
is_executable: bool, | |
name_length: u10, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment