Hacker News new | ask | show | jobs
by Wicher 3 days ago
Does it allow for padding so that the start of files can be (memory/filesystem)-page aligned? That allows for mmap-ing non-compressed members and also for reflinking in/out contents from/to the filesystem (on Linux with btrfs, XFS). With tar it's possible with some padding tricks involving PAX comments, see https://pkg.go.dev/nontrivialpursuit.org/deduptar (mine!).

For any new format I'd like to have that flexibility at least in the format; the utilities can implement it later or not at all but at least the format should allow for the required alignment.

3 comments

I had a look at this feature. As I understand this is only possible for files which are added unchanged to the zar file. The zar file is block based. Small files are put into bigger blocks for better compression and higher performance, big files are split into blocks. So this feature is not possible to implement without breaking changes.
My Aqueous (https://lifthrasiir.github.io/aqueous/) can, via spacer blocks. In fact uncompressed blocks are particularly designed for mmaping.
Interesting question. I'll have a look at it.