mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use Stream extension to ensure read operations return the requested number of bytes (unless EOF arrives first).
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user