mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
Cannot write Tar Header directly #494
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @anaisbetts on GitHub (Feb 17, 2022).
I'm trying to process an existing Tar Archive but mutate some of its properties (specifically, fix up its paths) - I can't expand and recompress the archive, because some important UNIX-only attributes would be lost by writing it to a Windows filesystem.
TarWriterdoes not allow you to pass aTarHeaderstructure directly toTarWriter.Write, which means that certain POSIX attributes like theuserIdorgroupIdcannot be set@adamhathcock commented on GitHub (Feb 21, 2022):
What you're asking for seems a bit odd but there's no reason not to allow it I guess. The Tar implementation isn't the best so some rework might be needed to do what you're wanting to achieve.
Though, I'm not sure what's compressed here because if you can read the Tar information, it's not compressed. Tar itself is just a a HEADER/BLOB key value pair type of thing so nothing is compressed. Of course, I could be missing something.