apfs-fuse
apfs-fuse copied to clipboard
Adding support for compression type 9
Hi Simon
Thank you for your great work!
While working on a project with disk images from an IPSW file for iOS, I encountered entries with compression type 9, after quick research I found these are non-compressed files. The source I found is a comment in a source code for copyfile from apple, I have quoted the snippet below from https://opensource.apple.com/source/copyfile/copyfile-173.40.2/copyfile.c.auto.html
switch (OSSwapLittleToHostInt32(hdr->compression_type)) { ... case 9: /* uncompressed data in xattr (similar to but not identical to CMP_Type1) */ case 10: /* 64k chunked uncompressed data in resource fork */ ...
I made a minor addition to add the support for compression type 9 and it worked perfectly. I hope someone else might find it useful as well.
Thanks
Thanks a lot! BTW, the cdata[0] is always 0xcc. I didn't find file compressed by algorithm 10 in a fresh installed MacOS but some files compressed by algorithm 9 e.g. /Library/Apple/System/Library/CoreServices/SafariSupport.bundle/Contents/PreferencePanes/Passwords.prefPane/Contents/Resources/de.lproj/InfoPlist.strings
Can be closed
Sorry it can't be closed my mistake, it should be MERGED (checked multiple times to be working properly)
Please re-open
Can be closed after almost 2 years... The author do not react to any of pull requests unfortunately.