Use Stream extension to ensure read operations return the requested number of bytes (unless EOF arrives first).

This commit is contained in:
2022-11-14 09:43:16 +00:00
parent f90cc6593f
commit 0eb589d785
178 changed files with 862 additions and 780 deletions

View File

@@ -32,6 +32,7 @@ using System.IO;
using Aaru.Checksums;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
using Aaru.Helpers;
using NUnit.Framework;
[TestFixture]
@@ -56,7 +57,7 @@ public class GZip
filter.Open(_location);
Stream str = filter.GetDataForkStream();
var data = new byte[1048576];
str.Read(data, 0, 1048576);
str.EnsureRead(data, 0, 1048576);
str.Close();
str.Dispose();
filter.Close();