libyal / libmodi

Library and tools to access the Mac OS disk image formats
GNU Lesser General Public License v3.0
20 stars 5 forks source link

Add bzip2 and LZMA compression fallback implementations #3

Open joachimmetz opened 3 years ago

joachimmetz commented 3 years ago

Add compression fallback implementations for better cross-platform portability

Artoria2e5 commented 8 months ago

I've got no idea about an LZMA encoder (not that it's needed here), but for a small decoder, the public-domain xz-embedded might just suffice. It doesn't have all the filters, but dmgs created through hdiutil and ultimately the Apple Compression Framework are not quite known for using anything other than the default anyways. You probably won't even need XZ_DEC_BCJ.

[Tangential: I wonder if the compression framework's limited lzma implementation can deal with "chunked" xz from lzma_stream_encoder_mt.]

joachimmetz commented 8 months ago

Unfortunately cannot reuse public domain code in this project.