During my comparison of compression algorithms I've tested your nuget package (Snappy.Sharp 1.0.0), but something is wrong: compressing a 10MB binary file results in about 18MB output, which is quite the opposite of compression :-)
10478124 bytes => 18661217 bytes ~ 178,10%
Switching to another snappy binding (Snappy.Net if I remember correctly) results in a 64% compression ratio.
My code looks something like this:
FileInfo tmp = new FileInfo(Path.GetTempFileName());
using (FileStream fs = new FileStream(tmp.FullName, FileMode.Open, FileAccess.Write, FileShare.None))
using (SnappyStream s = new SnappyStream(fs, CompressionMode.Compress))
{
// ... pump data into s
During my comparison of compression algorithms I've tested your nuget package (Snappy.Sharp 1.0.0), but something is wrong: compressing a 10MB binary file results in about 18MB output, which is quite the opposite of compression :-)
10478124 bytes => 18661217 bytes ~ 178,10%Switching to another snappy binding (Snappy.Net if I remember correctly) results in a 64% compression ratio.
My code looks something like this: