Coder Social home page Coder Social logo

lz4sharp's Introduction



LZ4Sharp

Port of Yann Collet’s LZ4 algorithm to C# by Clayton Stangeland.

Original LZ4 algorithm can be found at (http://code.google.com/p/lz4) it was created by Yann Collet. See license.txt for project license.

Build

Building in Debug or Release will use the already generated C# files

LZ4Compressor.c and LZ4Decompressor.c are updated by manually comparing to the original LZ4 code and fixing any C# differences from C but leaving some of the macros to make comparing easier.

Then building in the Generated configuration will only build the LZ4SharpGenerator project which has a prebuild event that uses the MinGW gcc from CodeBlocks to generate the C# files from LZ4Compressor.c and LZ4Decompressor.c.

Timings

Compression times do not include disk I/O.

P4 = Pentium 4 2GHz 32 bit Windows XP

i5 = Intel i5 2.67 GHZ 64 bit Windows 7 running LZ4Sharp in 64 bit

LZ4Sharp = Timings for ‘webster’ from silesia corpus (http://sun.aei.plsl.pl/~sdeor/index.php?page=silesia)

memcpy and LZ4 = Timing for file ‘webster’ in silesia corpus in m2mark.exe from http://sd-1.archive-host.com/membres/up/182754578/m2mark.zip (or from link to benchmark program at http://code.google.com/p/lz4)

gzip = GZip from the Intel compiler built as a dll and accessed from C# by PInvoke

Ratio = compressed size / decompressed size (lower is better)

ComputerTypeCompression (MB/s)Decompression (MB/s)Ratio (%)
P4memcpy217
P4LZ482304
P4LZ4Sharp43150
P4LZ4Sharp49181
i5memcpy1658
i5LZ42701184
i5LZ4Sharp20775849
i5LZ4Sharp26783847
i5gzip4826633

Conclusion:

LZ4 C# is about 2/3 the speed of the c version. (Also, LZ4C# is slightly faster on the whole silesia corpus than on just the ‘webster’ file) LZ4 C# Compressed silesia corpus is 47% of uncompressed LZ4 C# Compressed ‘webster’ file is 49% of uncompressed

lz4sharp's People

Contributors

stangelandcl avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

fperegrinvs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.