Giter VIP home page Giter VIP logo

lua-compress-deflatelua's Introduction

Description

compress.deflatelua is a library implementing DEFLATE, as well as zlib and gzip decompression in pure Lua.

Example usage

./gunziplua lua-5.1.4.tar.gz

Performance

It's somewhat slow (as expected). To decompress lua-5.1.4.tar.gz, it takes about 9 seconds with CRC-checking enabled (4 with LuaJIT 1.x) or 3 seconds with CRC checking disabled (2 with LuaJIT 1.x).

Rationale

Possible reasons for this module include:

  1. for pedagogical reasons
  2. to benchmark Lua
  3. to bootstrap applications like LuaRocks/LuaDist that might not have a precompiled copy of gunzip, and
  4. because DEFLATE has been implemented in other languages too, including Python, Perl, and Lisp.

Status

It should be robust and there are no known bugs. It successfully decompresses gzip files but there is currently no compressor implementation.

Dependencies

  • digest.crc32lua - CRC-32 checksum implemented in pure Lua
  • bit.numberlua - bitwise operations implemented in pure Lua as numbers (not required if using a native bitwise operation library)
  • pythonic.optparse - command-line processing resembling the Python optparse module

Conventions

The modules above follow a somewhat Perl CPAN-like naming convention. Compare to Compress::Zlib::Perl, Digest::CRC32 and the Bit:: modules.

Author

David Manura. See COPYRIGHT file.

lua-compress-deflatelua's People

Contributors

craigbarnes avatar davidm avatar

Watchers

 avatar  avatar

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.