mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-11 13:35:00 +00:00
[PR #1013] Add XZ/Lzw compression detection and clear error messages for compressed TAR files #1436
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?
Original Pull Request: https://github.com/adamhathcock/sharpcompress/pull/1013
State: closed
Merged: No
Opening tar.xz files with
TarArchive.Open()failed with "Failed to read TAR header" because the library tried to read compressed data directly without decompression.Changes
TarReader: Added XZ and Lzw compression detection
TarReader.Open()now detects and handles tar.xz and tar.Z files alongside existing GZip/BZip2/ZStandard/LZip supportTarArchive: Added compression detection with clear error messages
TarArchive.Open()now detects all compressed TAR formats and throwsInvalidFormatExceptionwith actionable guidanceTarReaderAPIUsage
For compressed TAR files, use
TarReader:Attempting
TarArchive.Open()on compressed files now produces:Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.