Giter Club home page Giter Club logo

Comments (57)

RJVB avatar RJVB commented on July 21, 2024 1

from afsctool.

RJVB avatar RJVB commented on July 21, 2024 1

from afsctool.

RJVB avatar RJVB commented on July 21, 2024 1

from afsctool.

RJVB avatar RJVB commented on July 21, 2024 1

from afsctool.

RJVB avatar RJVB commented on July 21, 2024 1

from afsctool.

RJVB avatar RJVB commented on July 21, 2024 1

from afsctool.

RJVB avatar RJVB commented on July 21, 2024 1

@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.

RJVB avatar RJVB commented on July 21, 2024 1

Thanks, this one works. And indeed I can read the files on OS X 10.9 :)

from afsctool.

RJVB avatar RJVB commented on July 21, 2024 1

from afsctool.

RJVB avatar RJVB commented on July 21, 2024 1

from afsctool.

RJVB avatar RJVB commented on July 21, 2024 1

from afsctool.

RJVB avatar RJVB commented on July 21, 2024 1

from afsctool.

RJVB avatar RJVB commented on July 21, 2024 1

from afsctool.

RJVB avatar RJVB commented on July 21, 2024

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

You're right, feel free to close

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

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.

RJVB avatar RJVB commented on July 21, 2024

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.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

Yes, it was meant more as a note to collect more info on this

from afsctool.

RJVB avatar RJVB commented on July 21, 2024

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

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.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

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:

from afsctool.

RJVB avatar RJVB commented on July 21, 2024

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

sure, i've edited the above table. will continue to do so

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

LZFSE was backported from 10.11.0 to 10.10.2 (Jan 2015)

I'm just checking whether LZVN was also backported.

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

OK, I am quite confident that the versions/dates above are accurate.

There was no backporting to 10.8

from afsctool.

RJVB avatar RJVB commented on July 21, 2024

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

Yes, LZVN is used to compress the kernel

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

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.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

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.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

Table in #6 (comment) updated

from afsctool.

RJVB avatar RJVB commented on July 21, 2024

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

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.

lilin007007 avatar lilin007007 commented on July 21, 2024

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.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

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.

lilin007007 avatar lilin007007 commented on July 21, 2024

@gingerbeardman I need some files in lzfse format for test. how do I create these files?

from afsctool.

RJVB avatar RJVB commented on July 21, 2024

from afsctool.

lilin007007 avatar lilin007007 commented on July 21, 2024

@RJVB I need a file in filesystem-level compression with lzfse use this tool or others, what could I do?

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

@lilin007007 I think you need another tool: https://github.com/lzfse/lzfse

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

@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.

lilin007007 avatar lilin007007 commented on July 21, 2024

@gingerbeardman they all can not work, I tested these. what is the yaa or compression_tool?I can not found them.

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

They are built-in MacOS command line tools, use them in Terminal. I'm on HighSierra and they work for me.

from afsctool.

lilin007007 avatar lilin007007 commented on July 21, 2024

@gingerbeardman Thank you.but They are not the system-level compression.I need a tool like ditto.

from afsctool.

RJVB avatar RJVB commented on July 21, 2024

from afsctool.

lilin007007 avatar lilin007007 commented on July 21, 2024

@RJVB I need some files for learn the format of the LZFSE on disk

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

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.

RJVB avatar RJVB commented on July 21, 2024

What kind of filesystem is on that dmg, APFS? I get a "no mountable filesystems" error...

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

Ah, yes, APFS is the default. Let me fix/redo it.

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

Earlier download is now updated.

from afsctool.

RJVB avatar RJVB commented on July 21, 2024

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

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.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

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.

RJVB avatar RJVB commented on July 21, 2024

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

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.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

@RJVB sorry, life got in the way, but I have some time shortly. still worth me testing latest version?

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

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.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

I hadn't had a chance to look at the code. I'll try Tyre stand alone lzvn soon

from afsctool.

gingerbeardman avatar gingerbeardman commented on July 21, 2024

FYI, LZVN seems to be default for HFS+ compressed apps from App Store, at least on MacOS High Sierra.

from afsctool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.