Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support decoding iCloud backup LZFSE compressed files #1294

Closed
lfcnassif opened this issue Aug 30, 2022 · 4 comments · Fixed by #1812
Closed

Support decoding iCloud backup LZFSE compressed files #1294

lfcnassif opened this issue Aug 30, 2022 · 4 comments · Fixed by #1812
Assignees

Comments

@lfcnassif
Copy link
Member

lfcnassif commented Aug 30, 2022

Seems iCloud backups (not supported by us officially) are using the LZFSE algorithm to compress the files, maybe we could add support to uncompress LZFSE. Below are some references:
https://github.com/lzfse/lzfse
https://github.com/horrorho/RagingMoose

@lfcnassif
Copy link
Member Author

Integrating RangingMoose seems not hard. We would need LZFSE compressed samples to test, check if a signature exists to call the decompressor, for example, and test the decompression of course.

@lfcnassif
Copy link
Member Author

@lfcnassif
Copy link
Member Author

lfcnassif commented Aug 11, 2023

Seems there is a 0x62 0x76 0x78 (little endian) header:
http://fileformats.archiveteam.org/wiki/LZFSE

At least for each block:
https://github.com/horrorho/RagingMoose/blob/master/src/main/java/com/github/horrorho/ragingmoose/LZFSEConstants.java#L40-L44

Confirmed near the beginning of their test file:
https://github.com/horrorho/RagingMoose/blob/master/src/test/resources/lzfse.test

So I'll wait for real iCloud backup samples to proceed...

@lfcnassif
Copy link
Member Author

Since RagingMoose library is experimental and its author suggests using the reference lzfse implementation, after I get/receive more lzfse compressed samples, I'll compare the results with those from https://pypi.org/project/pyliblzfse/

If results disagree, we may switch to a python parser using pyliblzfse

lfcnassif added a commit that referenced this issue Aug 16, 2023
lfcnassif added a commit that referenced this issue Aug 16, 2023
@lfcnassif lfcnassif changed the title Support decompression of iCloud backup LZFSE compression algorithm Support decoding of iCloud backup LZFSE compressed files Aug 16, 2023
@lfcnassif lfcnassif changed the title Support decoding of iCloud backup LZFSE compressed files Support decoding iCloud backup LZFSE compressed files Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant