Comments (57)
from afsctool.
from afsctool.
from afsctool.
from afsctool.
from afsctool.
from afsctool.
@gingerbeardman could you please attach a small DMG containing a file that uses compression type 7 and one using compression type 8, made on a recent OS? If you want add types 11 and 12 too, just to be exhaustive..
from afsctool.
Thanks, this one works. And indeed I can read the files on OS X 10.9 :)
from afsctool.
from afsctool.
from afsctool.
from afsctool.
from afsctool.
from afsctool.
from afsctool.
You're right, feel free to close
from afsctool.
I found a note about type 8 here: http://newosxbook.com/tools/hfsleuth.html#DOWNLOAD
11/11/2016
- Development resumed,
- support for file compression (type 4, zlib) added
- support for file compression type 8 (for MacOS compression as of 10.10)
from afsctool.
Last time I looked at other compression types I got the distinct impression that they're not of interest to end users, except possibly for decompression (but remember my earlier comment about that).
I also can't do much with references that don't provide source code!
from afsctool.
Yes, it was meant more as a note to collect more info on this
from afsctool.
from afsctool.
i edited my comment to remove the hfsleuth download: it is not open source.
Yes, I think type 8 is another form of compression, and I am almost finished putting a table together.
Some types are Apple's own open-source LZFSE: https://github.com/lzfse/lzfse (macOS 10.11 and iOS 9 onwards)
My thinking is that may provide better/faster compression than zlib?
from afsctool.
ALL are supported on both HFS+ and APFS
10.6 (mid 2009)
1 /* No compression; in xattr */
2 /* (unused) */
3 /* ZLIB; in xattr */
4 /* ZLIB (64K chunked); in rsrc fork */
5 /* (specifies de-dup within the generation store) */
6 /* (unused) */
10.10 (mid 2014) + 10.9.5 backport (late 2014)
7 /* LZVN; in xattr */
8 /* LZVN (64K chunked); in rsrc fork */
10.11 (mid 2015) + 10.10.2 backport (early 2015)
9 /* uncompressed; in xattr */
10 /* uncompressed (64K chunked); in rsrc fork */
11 /* LZFSE; in xattr */
12 /* LZFSE; in rsrc fork */
other
0x80000001 /* faulting file: deprecated */
LZFSE also used for compression of DMGs. man hdiutil
[macOS 10.11; 2015]
References:
- https://opensource.apple.com/source/copyfile/copyfile-138/copyfile.c.auto.html
- sleuthkit/sleuthkit#401 (10.10.2 backport)
- https://github.com/sleuthkit/sleuthkit/blob/develop/tsk/fs/tsk_hfs.h#L538 (3,4,5,7,8,9,10)
- https://reverseengineering.stackexchange.com/questions/8209/unknown-mac-osx-10-10-hfs-compression/8233#8233?newreg=b9e853a32667484aad3ecc77597d8f63 (LZVN: 7,8,9,10)
- https://github.com/sgan81/apfs-fuse/blob/41267b41c16ec7822bb85c50c09b672b850c0ed7/ApfsLib/Decmpfs.cpp (3,4,7,8)
- https://github.com/Fisummer/hackintosh/blob/12cdb246f22d2309610f0f76468b7fa61daefb44/new%20installation%20kext/SLE/AppleFSCompressionTypeZlib.kext/Contents/Info.plist (LZFSE: 3,4,7,8,9,10,11,12)
- https://github.com/Piker-Alpha/LZVN (compress/decompress, blog posts)
- /System/Library/Extensions/AppleFSCompressionTypeZlib.kext/Contents/Info.plist (3,4,7,8,9,10,11,12)
- /System/Library/Extensions/AppleFSCompressionTypeDataless.kext/Contents/Info.plist (5)
from afsctool.
from afsctool.
sure, i've edited the above table. will continue to do so
from afsctool.
LZFSE was backported from 10.11.0 to 10.10.2 (Jan 2015)
I'm just checking whether LZVN was also backported.
from afsctool.
OK, I am quite confident that the versions/dates above are accurate.
There was no backporting to 10.8
from afsctool.
from afsctool.
Yes, LZVN is used to compress the kernel
from afsctool.
https://opensource.apple.com/source/copyfile/copyfile-138/copyfile.c.auto.html
Boom! A pretty complete list. I'll update my list here tomorrow.
from afsctool.
I can't take the credit, somebody else dug up the link to that code.
But it would be great if the "best" compression type for each OS could be supported? Do you think that you might plan to do that?
from afsctool.
Table in #6 (comment) updated
from afsctool.
from afsctool.
Correct, you are good for LZVN on 10.9.
The code to deal with LZVN is part of the system, but I'm not sure if it's still private and/or easily accessible. Further reading: https://pikeralpha.wordpress.com/2014/11/01/lzvn-encode/ and related blog posts.
So there is a reverse engineered version: https://github.com/Piker-Alpha/LZVN (encode/decode)
from afsctool.
I want to compress a file use lzfse on hfs+ filesystem, what cloud i do?ditto always uses zlib.I am on 10.11
from afsctool.
I want to compress a file use lzfse on hfs+ filesystem, what cloud i do?
@lilin007007 you would have to add this feature yourself, if @RJVB is not planning to do so
from afsctool.
@gingerbeardman I need some files in lzfse format for test. how do I create these files?
from afsctool.
from afsctool.
@RJVB I need a file in filesystem-level compression with lzfse use this tool or others, what could I do?
from afsctool.
@lilin007007 I think you need another tool: https://github.com/lzfse/lzfse
from afsctool.
@lilin007007 @RJVB there's also a built in tool.
See: https://www.keolo.com/blog/post/terminal-commands/
Compressing a single file using LZFSE
compression_tool -encode -i File.txt -o File.lzfse
Decompressing a single file using LZFSE
compression_tool -decode -i File.lzfse -o File.txt
Compressing a folder using LZFSE
yaa archive -d Folder -o File.yaa
Decompressing a folder using LZFSE
yaa extract -i File.yaa -d Folder
from afsctool.
@gingerbeardman they all can not work, I tested these. what is the yaa or compression_tool?I can not found them.
from afsctool.
They are built-in MacOS command line tools, use them in Terminal. I'm on HighSierra and they work for me.
from afsctool.
@gingerbeardman Thank you.but They are not the system-level compression.I need a tool like ditto.
from afsctool.
from afsctool.
@RJVB I need some files for learn the format of the LZFSE on disk
from afsctool.
Here's one containing 7&8: 7and8.dmg.zip
One .plist and one .xml file, both taken from Safari Technology Preview Release 64 (Safari 12.1, WebKit 13607.1.3.3) on macOS 10.13.6 (17G65)
Just trying to think of a way to search for any files using 11 & 12...
from afsctool.
What kind of filesystem is on that dmg, APFS? I get a "no mountable filesystems" error...
from afsctool.
Ah, yes, APFS is the default. Let me fix/redo it.
from afsctool.
Earlier download is now updated.
from afsctool.
from afsctool.
Of course I will be happy to test. The least I can do seeing as I got you into this mess
I'll package up a range of 7&8 files with different sizes.
from afsctool.
It's easy for you to get them, I just try using afsctool to decompress the latest Safari Technology Preview app.
But I should be able to get to it tomorrow.
from afsctool.
from afsctool.
Great! Sorry I ended up driving most of yesterday.
You can use an app called Pacifist to extract single files out of Mac pkg/installers.
I've also been looking into sleuthkit. How do you find it?
from afsctool.
@RJVB sorry, life got in the way, but I have some time shortly. still worth me testing latest version?
from afsctool.
is the following message anything to worry about?
lzvn compression failed on chunk #0
examples
/Applications/Microsoft Word.app/Contents/Frameworks/MicrosoftProofing.framework/Versions/A/Resources/es.lproj/conjunct.txt: lzvn compression failed on chunk #0
/Applications/Microsoft Word.app/Contents/Frameworks/MicrosoftProofing.framework/Versions/A/Resources/th.lproj/wordend.txt: lzvn compression failed on chunk #0
/Applications/Microsoft Word.app/Contents/Frameworks/MicrosoftProofing.framework/Versions/A/Resources/th.lproj/smtm.txt: lzvn compression failed on chunk #0
from afsctool.
I hadn't had a chance to look at the code. I'll try Tyre stand alone lzvn soon
from afsctool.
FYI, LZVN seems to be default for HFS+ compressed apps from App Store, at least on MacOS High Sierra.
from afsctool.
Related Issues (20)
- Cannot compress in Big Sur HOT 1
- Building on Apple M1 HOT 5
- Is this afsctool the clear successor to the original? Should the homebrew afsctool formula point here instead? HOT 4
- Does your afsctool support APFS? HOT 2
- Unable to build LZVN on apple m1 HOT 15
- building for macOS-x86_64 but attempting to link with file built for macOS-arm64 HOT 8
- About maintenance of the fork HOT 3
- Is this identical to 'brew install afsctool' or is that the original version? HOT 4
- Failed to build on M1 - Monterey 12.0.1 with Xcode 13.1 HOT 11
- Process stuck waiting HOT 12
- Are we ready for a new release? HOT 3
- Unable to build when the path to Xcode contains spaces HOT 3
- Build errors with GCC 5 HOT 9
- Recovering missing/deleted files HOT 4
- Time Machine risks? HOT 3
- Incorrect license HOT 4
- -t and -i options usage HOT 10
- afsctool breaks binaries, sometimes (HFS+) HOT 9
- Compress, decompress, compress results in lots of mismatch errors HOT 19
- compressing breaks app (workaround: restart mac) HOT 25
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from afsctool.