We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6410574 + 6e55d8b commit 7f0079bCopy full SHA for 7f0079b
1 file changed
NETCoreSync/SyncEngineHelpers.cs
@@ -47,7 +47,13 @@ internal static string Decompress(byte[] data)
47
{
48
using (var gzip = new GZipStream(ms, CompressionMode.Decompress))
49
50
- gzip.Read(buffer, 0, uncompressedSize);
+ int totalRead = 0;
51
+ while (totalRead < buffer.Length)
52
+ {
53
+ int bytesRead = gzip.Read(buffer, totalRead, buffer.Length - totalRead);
54
+ if (bytesRead == 0) break;
55
+ totalRead += bytesRead;
56
+ }
57
}
58
59
return Encoding.Unicode.GetString(buffer);
0 commit comments