Detect when users try to open tar.bz2, tar.lz, and other compressed tar formats with ArchiveFactory.Open() and provide clear guidance to use ReaderFactory.Open() instead. These formats require forward-only reading due to decompression stream limitations and cannot be used with the random-access Archive API.
Includes tests to verify the helpful error messages are shown.
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
- Updated SharpCompress.csproj target frameworks from net48;net481;netstandard2.0;net6.0;net8.0 to net48;net481;netstandard2.0;net8.0;net10.0
- Updated test and build projects to use .NET 10
- Updated global.json to .NET 10 SDK
- Updated CI workflow to use .NET 10
- Fixed deprecated Rfc2898DeriveBytes constructor for .NET 10 (SYSLIB0060)
- Updated package description and README to reflect new supported frameworks
- Updated package versions for .NET 10 compatibility
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Also fixes pre-existing version mismatch for advanced compression methods that require version 63. Added tests for LZMA and PPMd to verify version consistency.
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
When UseZip64=true but files are small, ensure Central Directory File Header uses version 45 to match Local File Header. This fixes validation failures in System.IO.Packaging and other strict readers.
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
ArrayPool.Rent() can return buffers larger than requested. The tests were using test.Length (the actual buffer size) instead of the requested size (0x1000), causing failures on Windows where ArrayPool returns larger buffers than on Linux.
Fixed by:
- Using explicit size (0x1000) instead of test.Length in Read() calls
- Using test.Take(0x1000) instead of test when comparing arrays
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
Use SharpCompressStream.Create instead of constructor to properly handle
streams that are already wrapped. This prevents potential buffering issues
when opening ZIP files, particularly on Linux systems.
Added tests to verify both raw FileStream and pre-wrapped stream scenarios.
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>