• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Should I be concerned about the XATTR_SHOWCOMPRESSION option?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should I be concerned about the XATTR_SHOWCOMPRESSION option?


  • Subject: Re: Should I be concerned about the XATTR_SHOWCOMPRESSION option?
  • From: James Bucanek <email@hidden>
  • Date: Wed, 29 Feb 2012 17:47:59 -0700

Chris Suter <mailto:email@hidden> wrote (Thursday, February 23, 2012 4:27 AM +1100):

To correctly handle compressed files, you basically need to use
XATTR_SHOWCOMPRESSION to copy the resource fork and the extended
attribute, and then you must set the UF_COMPRESSED flag as the last
thing you do.

I did see some draft documentation from DTS about it. I don't know
whether it got published, but you could try contacting them if you get
stuck.

Chris,

DTS was able to dig up that draft document and send it too me. It was very helpful.

Everything in your earlier post was correct, but just to be clear (if anyone else is playing along at home), the contents of large compressed files is stored in the resource fork. BUT, said resource fork data is NOT accessible through the normal means. It's only accessible via the "com.apple.ResourceFork" extended attribute.

I was under the mistaken impression that I could capture/restore the compressed version of the file simply by coping the resource fork, but that doesn't work. As soon as I got the documentation explaining the steps, I was able to get everything working.

So, just for the record, to duplicate an HFS+ compressed file (UF_COMPRESSED), ignore both data forks; don't try to read or write them at all. Create an empty file, copy over all of the extended attributes (using XATTR_SHOWCOMPRESSION to read the special compression attributes), and then set the UF_COMPRESSED file flag. Magically, a file with an uncompressed data fork will suddenly appear in the filesystem.

Thanks for all the assistance,

James
--
James Bucanek


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Should I be concerned about the XATTR_SHOWCOMPRESSION option?
      • From: Chris Suter <email@hidden>
References: 
 >Re: Should I be concerned about the XATTR_SHOWCOMPRESSION option? (From: Chris Suter <email@hidden>)

  • Prev by Date: disk vs rdisk, was: How to obtain the FAT serial number form a volume
  • Next by Date: Re: Should I be concerned about the XATTR_SHOWCOMPRESSION option?
  • Previous by thread: Re: Should I be concerned about the XATTR_SHOWCOMPRESSION option?
  • Next by thread: Re: Should I be concerned about the XATTR_SHOWCOMPRESSION option?
  • Index(es):
    • Date
    • Thread