Open rawhuul opened 1 year ago
@bojand and collaborators. I believe I ran into this a while ago when developing Salvum. Please check out the archive.rs that I modified at the time to see if there is anything useful then can merge in what you want. I apologize if this is not the best way to collaborate but I have way too much code to push right now so forgive me I must press forward.
https://github.com/STashakkori/Salvum_Infer/blob/main/src/matchers/archive.rs
Specific to lzma I added this: pub fn is_lzma(buf: &[u8]) -> bool { buf.len() > 4 && buf[0] == 0x5D && buf[1] == 0x00 && buf[2] == 0x00 && (buf[3] == 0x80 || buf[3] == 01 || buf[3] == 10 || buf[3] == 08 || buf[3] == 20 || buf[3] == 40 || buf[3] == 80 || buf[3] == 00) && (buf[4] == 0x00 || buf[4] == 0x01 || buf[4] == 0x02) }
@rawhuul see if this addresses your issue, if not apologies. Best, $t@$h
I have these files which are LZMA type as shown in extension and by 7z archiver
But when used in this code:
It gives output:
As if I am doing something wrong or anything else? One more thing is that how to infer LZH archives?