remove console.writeline's in OuterEncryptionReader

This commit is contained in:
2026-03-24 23:05:38 +03:00
parent 46abdd37cc
commit 5a4f68e70a

View File

@@ -113,7 +113,6 @@ public class OuterEncryptionReader : Stream
public override int Read(Span<byte> buffer) public override int Read(Span<byte> buffer)
{ {
Console.WriteLine("OE read " + buffer.Length);
int toRead = buffer.Length; int toRead = buffer.Length;
int read = 0; int read = 0;
while (toRead > 0) while (toRead > 0)
@@ -122,24 +121,20 @@ public class OuterEncryptionReader : Stream
{ {
if (!isCurrentChunkLast) if (!isCurrentChunkLast)
{ {
Console.WriteLine("OER: reading next chunk");
LoadAndDecryptNextChunk(); LoadAndDecryptNextChunk();
} }
else else
{ {
Console.WriteLine("OER: read " + read + " bytes before EOF");
break; break;
} }
} }
byte[] chunk = currentChunk!; byte[] chunk = currentChunk!;
int n = Math.Min(toRead, chunk.Length - chunkPosition); int n = Math.Min(toRead, chunk.Length - chunkPosition);
Console.WriteLine("OER: copy " + n + " bytes chunk+" + chunkPosition + " -> buffer+" + read);
new Span<byte>(chunk, chunkPosition, n).CopyTo(buffer.Slice(read)); new Span<byte>(chunk, chunkPosition, n).CopyTo(buffer.Slice(read));
read += n; read += n;
toRead -= n; toRead -= n;
chunkPosition += n; chunkPosition += n;
position += n; position += n;
Console.WriteLine(string.Format("read={0} toread={1} pos={2}", read, toRead, chunkPosition));
} }
return read; return read;
} }