mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
Libraries: Change enums to enum classes in LibArchive
This commit is contained in:
parent
3eb6016dda
commit
be360db223
2 changed files with 21 additions and 14 deletions
|
@ -70,13 +70,27 @@ struct [[gnu::packed]] EndOfCentralDirectory {
|
|||
}
|
||||
};
|
||||
|
||||
enum class ZipCompressionMethod : u16 {
|
||||
Store = 0,
|
||||
Shrink = 1,
|
||||
Reduce1 = 2,
|
||||
Reduce2 = 3,
|
||||
Reduce3 = 4,
|
||||
Reduce4 = 5,
|
||||
Implode = 6,
|
||||
Reserved = 7,
|
||||
Deflate = 8
|
||||
};
|
||||
|
||||
OutputStream& operator<<(OutputStream& stream, ZipCompressionMethod method);
|
||||
|
||||
struct [[gnu::packed]] CentralDirectoryRecord {
|
||||
static constexpr Array<u8, signature_length> signature = { 0x50, 0x4b, 0x01, 0x02 }; // 'PK\x01\x02'
|
||||
|
||||
u16 made_by_version;
|
||||
u16 minimum_version;
|
||||
u16 general_purpose_flags;
|
||||
u16 compression_method;
|
||||
ZipCompressionMethod compression_method;
|
||||
u16 modification_time;
|
||||
u16 modification_date;
|
||||
u32 crc32;
|
||||
|
@ -192,18 +206,6 @@ struct [[gnu::packed]] LocalFileHeader {
|
|||
}
|
||||
};
|
||||
|
||||
enum ZipCompressionMethod : u16 {
|
||||
Store = 0,
|
||||
Shrink = 1,
|
||||
Reduce1 = 2,
|
||||
Reduce2 = 3,
|
||||
Reduce3 = 4,
|
||||
Reduce4 = 5,
|
||||
Implode = 6,
|
||||
Reserved = 7,
|
||||
Deflate = 8
|
||||
};
|
||||
|
||||
struct ZipMember {
|
||||
String name;
|
||||
ReadonlyBytes compressed_data; // TODO: maybe the decompression/compression should be handled by LibArchive instead of the user?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue