Skip to content

Compression creates even larger files #17

Description

@nzain

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions