adamhathcock / sharpcompress

SharpCompress is a fully managed C# library to deal with many compression types and formats.
MIT License
2.26k stars 479 forks source link

Adding a Hard Link entry type for Tar #124

Open maygarg opened 8 years ago

maygarg commented 8 years ago

Hi,

I need to be able to add Hard Link entries in a Tar Archive.

In the current code TarEntry has a TarFilePart, TarFilePart has a TarHeader, TarHeader has an EntryType property where probably a HardLink type can be specified but TarFilePart, TarHeader and EntryType are all inaccessible from the client code.

Even if they were, there is no property which will have the Link file name.

Am I missing anything here or the SharpCompress library does not support writing Hard Link entries to a Tar archive?

Regards, Mayank

adamhathcock commented 8 years ago

I'll have to revisit the Tar code. I can't remember I properly implemented Hard Links or not. I do know Tar is one of the more incomplete implementations in sharpcompress.

konste commented 8 years ago

Is there a chance you may revisit this issue? Storing Hardlinks in TAR is its unique feature and the reason may people actually select TAR over other archivers - it makes dramatic difference when the data contain many duplicate files.

adamhathcock commented 8 years ago

It is unlikely I'll be doing anything with sharpcompress myself between a young family and work.

Accepting pull requests though!