make more use of stream.CopyTo on (de)compressors, plus several cosmetics

This commit is contained in:
UbitUmarov
2025-06-19 20:11:42 +01:00
parent 6180fe5340
commit 4b1df46f6a
14 changed files with 47 additions and 66 deletions

View File

@@ -78,9 +78,8 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
if (fInfo.Exists)
{
FileStream fStream = new FileStream(path, FileMode.Open, FileAccess.Read);
byte[] idata = new byte[numBytes];
BinaryReader br = new BinaryReader(fStream);
idata = br.ReadBytes((int)numBytes);
byte[] idata = br.ReadBytes((int)numBytes);
br.Close();
fStream.Close();
info.Data = idata;