mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Refactor] General reformat and clean-up.
This commit is contained in:
@@ -18,12 +18,12 @@ public partial class PackStream : Stream
|
||||
|
||||
// Read full compressed data into memory
|
||||
compressedStream.Position = 0;
|
||||
byte[] inBuf = new byte[compressedStream.Length];
|
||||
var inBuf = new byte[compressedStream.Length];
|
||||
compressedStream.ReadExactly(inBuf, 0, inBuf.Length);
|
||||
|
||||
// Allocate output buffer
|
||||
_decoded = new byte[decompressedLength];
|
||||
nint outLen = (nint)decompressedLength;
|
||||
var outLen = (nint)decompressedLength;
|
||||
|
||||
// Call native decompressor
|
||||
int err = arc_decompress_pack(inBuf, inBuf.Length, _decoded, ref outLen);
|
||||
@@ -69,7 +69,7 @@ public partial class PackStream : Stream
|
||||
|
||||
if(remaining <= 0) return 0;
|
||||
|
||||
int toRead = (int)Math.Min(count, remaining);
|
||||
var toRead = (int)Math.Min(count, remaining);
|
||||
Array.Copy(_decoded, _position, buffer, offset, toRead);
|
||||
_position += toRead;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user