mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
SharpCompress fails to validate tar compressed using zstd #690
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 @SimonCahill on GitHub (Jul 14, 2025).
It's been a while since I've actively used this library, but I'd had good experiences in the past, so I decided to use it once more.
I have the following test case:
Interestingly, it fails to detect the tar header in the marked line.
The
VerifyTarHeadermethod works as expected and doesn't throw.Checking the debugger, I get the following information:
Below is a hex dump of the zst file:
Extracting the compressed data and piping into the
tarcommand yields the desired results:I'll include the files here, too. The
.binis just the.tzstrepackaged as a sanity check that thefilecommand is reporting correctly.TestCompressDirectory_ZstCompressedTar_FileInRoot.bin.txt
TestCompressDirectory_ZstCompressedTar_FileInRoot.tar.txt
TestCompressDirectory_ZstCompressedTar_FileInRoot.tzst.txt
Am I missing something, or have I stumbled on a bug?