1
0

Fix GZippedString decompress

This commit is contained in:
2023-11-12 18:52:29 +01:00
parent a274c5eaf3
commit 5228f3e840
2 changed files with 34 additions and 10 deletions

View File

@@ -6,4 +6,16 @@ public static class Extensions
{
Console.Out.WriteLine(str);
}
public static byte[] ReadAllToByteArray(this Stream stream)
{
var bytes = new List<byte>();
int b;
// -1 is a special value that mark the end of the stream
while ((b = stream.ReadByte()) != -1) bytes.Add((byte)b);
return bytes.ToArray();
}
}