Migrate all compression code to Rust

This commit is contained in:
topjohnwu
2025-05-01 02:28:00 -07:00
committed by John Wu
parent 527bbc0368
commit 78d1200608
26 changed files with 1871 additions and 1265 deletions
+5 -5
View File
@@ -610,9 +610,9 @@ struct boot_img {
std::bitset<BOOT_FLAGS_MAX> flags;
// The format of kernel, ramdisk and extra
format_t k_fmt = UNKNOWN;
format_t r_fmt = UNKNOWN;
format_t e_fmt = UNKNOWN;
FileFormat k_fmt;
FileFormat r_fmt;
FileFormat e_fmt;
/*************************************************************
* Following pointers points within the read-only mmap region
@@ -672,8 +672,8 @@ struct boot_img {
boot_img(const char *);
~boot_img();
bool parse_image(const uint8_t *addr, format_t type);
std::pair<const uint8_t *, dyn_img_hdr *> create_hdr(const uint8_t *addr, format_t type);
bool parse_image(const uint8_t *addr, FileFormat type);
std::pair<const uint8_t *, dyn_img_hdr *> create_hdr(const uint8_t *addr, FileFormat type);
// Rust FFI
rust::Slice<const uint8_t> get_payload() const { return payload; }