RJVB / afsctool

This is a version of "brkirch"'s afsctool utility that allows end-users to leverage HFS+ compression.
https://brkirch.wordpress.com/afsctool
GNU General Public License v3.0
187 stars 18 forks source link

"File is already HFS+/APFS compressed." #36

Closed sergei-dyshel closed 3 years ago

sergei-dyshel commented 3 years ago

When compressing previously uncompressed file, I get message that it is already compressed:

$ unpigz 10.215.110.178-bx.gz

<130> [3] 16:24 /Users/sergei/artifacts/
$ afsctool -v 10.215.110.178-bx10.215.110.170-bx
/Users/sergei/amazon/artifacts/gameday/10.215.110.178-bx:
File is not HFS+/APFS compressed.
File content type: dyn.ah62d4rv4ge8xcr32fzvhu
File data fork size (reported size by Mac OS X Finder): 950219014 bytes / 950.2 MB (megabytes, base-10)
Number of extended attributes: 0
Total size of extended attribute data: 0 bytes
Approximate total file size (data fork + resource fork + EA + EA overhead + file overhead): 950222848 bytes / 906.2 MiB

[3] 16:24 /Users/sergei/artifacts/
$ afsctool -c 10.215.110.178-bx
File is already HFS+/APFS compressed.

[3] 16:25 /Users/sergei/artifacts/
$ afsctool -v 10.215.110.178-bx
/Users/sergei/amazon/artifacts/gameday/10.215.110.178-bx:
File is HFS+/APFS compressed.
Compression type: ZLIB in resource fork (4)
File content type: dyn.ah62d4rv4ge8xcr32fzvhu
File size (uncompressed; reported size by Mac OS 10.6+ Finder): 950219014 bytes / 950.2 MB (megabytes, base-10)
File size (compressed): 67719168 bytes / 64.6 MiB
Compression savings: 92.9%
Number of extended attributes: 0
Total size of extended attribute data: 0 bytes
Uncompressed file size reported in compressed header: 950219014 bytes
RJVB commented 3 years ago

You mean a file that was previously compressed with gzip? Do you get the same error when using gunzip to uncompress it? Is the (original, compressed) file safe to attach here so I can try to reproduce the issue and see why it occurs?

MegaByte commented 3 years ago

I also get this message when I compress an uncompressed file. It seems to compress it though. On Big Sur.

RJVB commented 3 years ago

On Sunday December 20 2020 21:31:04 Aaron Kaluszka wrote:

I also get this message when I compress an uncompressed file. It seems to compress it though. On Big Sur.

Can you share the original file? What hardware are you running on?

MegaByte commented 3 years ago

I get this for any file. I was testing on the files in this repo, such as CMakeLists.txt. MacBook Pro (Retina, 15-inch, Mid 2015)

RJVB commented 3 years ago

Do you still have the possibility to boot under the (or a) previous version of the OS? Evidently you decompress the files before each new attempt to compress them? ;)

If this syndrome is caused by an OS upgrade I am going to have to stare long and hard at the code to see what can be different. I hope Apple didn't modify the system functions that are used for setting the extended attributes storing the compression data (com.apple.decmpfs and com.apple.ResourceFork for larger files). Does the compiler show you obsolete warnings in that part of the code?

What you could do is building my getfattr utility (in the attr repo on here) and see what getfattr -d /path/to/foo returns for a file supposedly already compressed before compressing it and after. And if you can, what it shows in an older OS version where those files still compress without warnings.

MegaByte commented 3 years ago

I tried this on another machine that is running Catalina (XCode 11.4.1) and it has the same behavior. I didn't see any compiler warnings. It looks like there's a bunch of autoconf stuff I'd need to resolve to get getfattr building, so I can't try that now.