msd: add option to print ouith tree instead of static, some improvements to pfl_upg, mtk_pkg: add option to not delete decompressed lzhs part

This commit is contained in:
theubusu
2026-02-18 22:54:03 +01:00
parent ab727411dc
commit f4a146a389
11 changed files with 128 additions and 112 deletions
+13 -1
View File
@@ -48,7 +48,10 @@ pub struct Header {
}
impl Header {
pub fn description(&self) -> String {
common::string_from_bytes(&self.description_bytes)
common::string_from_bytes(&self.description_bytes).replace('\r', "\n")
}
pub fn is_encrypted(&self) -> bool {
(self.mask & 0x2000_0000) != 0
}
}
@@ -64,4 +67,13 @@ impl FileHeader {
pub fn file_name(&self) -> String {
common::string_from_bytes(&self.file_name_bytes)
}
pub fn is_folder(&self) -> bool {
(self.attributes[3] & (1 << 1)) != 0
}
pub fn has_extended_name(&self) -> bool {
(self.attributes[2] & (1 << 7)) != 0
}
pub fn _is_package(&self) -> bool {
(self.attributes[3] & (1 << 1)) != 0
}
}