You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With .NET 5 and .NET 6, I noticed that reading from an entry stream from certain 7z file reads too many bytes when the Read(Span<byte>) overload is used.
E.g.:
using (var archive = SevenZipArchive.Open("test.7z"))
{
var entry = archive.Entries.First(entry => entry.Key == "test.txt");
using (var stream = entry.OpenEntryStream())
{
byte[] buffer = new byte[1024];
int bytesRead = stream.Read(buffer.AsSpan()); // stream.Read(buffer, 0, 1024) works
Console.WriteLine(bytesRead);
}
}
With the sample 7z file attached (I had to put it into a zip file test.zip to be able to upload it), this reads 18 bytes instead of the expected 12 bytes. The Read(byte[], int, int) overload works for me as expected.
Using version 0.30.1 from NuGet.
The text was updated successfully, but these errors were encountered:
With .NET 5 and .NET 6, I noticed that reading from an entry stream from certain 7z file reads too many bytes when the
Read(Span<byte>)
overload is used.E.g.:
With the sample 7z file attached (I had to put it into a zip file test.zip to be able to upload it), this reads 18 bytes instead of the expected 12 bytes. The
Read(byte[], int, int)
overload works for me as expected.Using version 0.30.1 from NuGet.
The text was updated successfully, but these errors were encountered: