Fix GZippedString decompress
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user