5 ms·
Actually, I believe OS X does this for small files in order to not burn a whole filesystem block on a sub 1k file. "In Mac OS X Snow Leopard 10.6, HFS+ compres
by mdellabitta 11y ago
Actually, I believe OS X does this for small files in order to not burn a whole filesystem block on a sub 1k file.
"In Mac OS X Snow Leopard 10.6, HFS+ compression was added. In open source and some other areas this is referred to as AppleFSCompression. Compressed data may be stored in either an extended attribute or the resource fork.[13] When using non-Apple APIs, AppleFSCompression is not always completely transparent."
https://en.wikipedia.org/wiki/HFS_Plus#History https://en.wikipedia.org/wiki/HFS_Plus#History
- astrange 11y agoFS compression is transparent to any regular file-reading API; it only shows up in lower-level APIs, like if you want to copy the file and keep the compression.
- mdellabitta 11y agoI was responding to the comment "You wouldn't put the entire content of a file in an extended attribute, would you?" HFS+ does, although in this case, it does without leaking that detail to callers.