Add support for uncompressing .tar.xz archives - #597
Conversation
|
@dennisdoomen This should look familiar to you (did the same thing in FA.. this whole nodejs thing ;) ) |
|
@ITaluone i wanna bring in some more discipline, can you create an issue for that please and describe the use case we're trying to solve here? And then I'd say lets target this for the next release, not the current one. I wanna close the lid on this one (already relabelled) |
@ChrisonSimtian |
| using SharpCompress.Readers; | ||
| using Fallout.Common.Utilities.Collections; | ||
|
|
||
| namespace Fallout.Common.IO; |
There was a problem hiding this comment.
🔧 (required) Please also do an auto-cleanup with Rider or R# so we improve the layout of existing files gradually.
| UncompressTar(archiveFile, directory, x => new BZip2InputStream(x)); | ||
| } | ||
|
|
||
| public static void UnTarXzTo(this AbsolutePath archive, AbsolutePath directory) |
There was a problem hiding this comment.
🔧 We need to be more rigid on the documentation side, something Nuke really lacked. I'm expecting some XML docs on what does method does, which extensions it supports, what happens if directory doesn't exist, what happens if directory contains conflicting files, etc.
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="SharpZipLib" /> | ||
| <PackageReference Include="SharpCompress" /> |
There was a problem hiding this comment.
@ChrisonSimtian do you see a concern with this extra dependency? I don't.
What changed
UnTarXzToextension onAbsolutePath, usingSharpCompress.Readers.ReaderFactoryto extract.tar.xz/.txzarchives.UncompressToalongside the existing zip/tar.gz/tar.bz2 branches..tar.xzstays unsupported (CompressTostill fails fast with a clear message) — this PR only adds the read path.SharpCompresspackage reference toFallout.Utilities.IO.Compression.Verification
Manual
Targetwhich runs this extensionDrawback
Compressing
.tar.xzfiles does not work, since the upstream lib also can't do this.Closes: #596