You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The native implementation does sometimes not restore the original data when compressing and then decompressing.
byte[] uncompressed = new byte[] { 5,0,5,0,6,0,6,0,5,0,
5,0,5,0,5,0,5,0,6,0,
6,0,5,0,5,0,5,0,5,0,
5,0,5,0,5,0,5,0,5,0,
5,0,5,0,4,0,5,0,5,0,
5,0,5,0,5,0,4,0,5,0,
5,0,5,0,5,0,5,0,4,0,
5,0,5,0,5,0,5,0,5,0,
5,0};
byte[] compressed = new byte[100];
Snappy.Sharp.SnappyCompressor snappyCompressor = new Snappy.Sharp.SnappyCompressor();
int countBytes = snappyCompressor.Compress( uncompressed, 0, uncompressed.Length, compressed, 0 );
Snappy.Sharp.SnappyDecompressor snappyDecompressor = new Snappy.Sharp.SnappyDecompressor();
byte[] uncompressed2 = snappyDecompressor.Decompress( compressed, 0, countBytes );
The last bytes are corrupted. The compression/decompression works fine for several similar data packages but after approx. 100 packages the above data produces corrupt data.
The text was updated successfully, but these errors were encountered:
The native implementation does sometimes not restore the original data when compressing and then decompressing.
The last bytes are corrupted. The compression/decompression works fine for several similar data packages but after approx. 100 packages the above data produces corrupt data.
The text was updated successfully, but these errors were encountered: