GithubHelp home page GithubHelp logo

isabella232 / lua-compress-deflatelua Goto Github PK

View Code? Open in Web Editor NEW

This project forked from luadist/lua-compress-deflatelua

0.0 0.0 0.0 139 KB

DEFLATE (RFC1951)/gunzip implemented in pure Lua

Home Page: http://lua-users.org/wiki/ModuleCompressDeflateLua

License: Other

Perl 6.02% Lua 93.98%

lua-compress-deflatelua's Introduction

=== Description ===

compress.deflatelua is Lua module implementing DEFLATE [5,1], as well as
zlib [4] and gzip [6] decompression in pure Lua.

=== Example / Performance ===

  ./gunziplua lua-5.1.4.tar.gz

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
      [http://en.wikipedia.org/wiki/DEFLATE] (including Python,
      Perl, and Lisp).

=== Status ===

It should be robust, and no bugs are currently known.
It successfully decompresses gzip files.

This module currently only decompresses.  A compressor is not
implemented.

=== Dependencies ===

  * digest.crc32lua - CRC-32 checksum implemented in pure Lua
    github: http://github.com/davidm/lua-digest-crc32lua
  * bit.numberlua - bitwise operations implemented in pure Lua
    as numbers
    github: http://github.com/davidm/lua-bit-numberlua
    (note: if using a native bitwise operation library like
    LuaBitOp or 5.2.0-work4, you can replace bxor with
    bit.bxor in digest.crc32lua and them omit this library)
  * pythonic.optparse - Command-line processing resembling
    Python optparse module
    github: http://github.com/davidm/lua-pythonic-optparse

Tested on 5.1, 5.2.0-work4, and LuaJIT2 development version
(October 2010).

=== Conventions ===

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

=== Author ===

David Manura.  See COPYRIGHT file.

=== References ===

[1] http://en.wikipedia.org/wiki/DEFLATE
[2] http://search.cpan.org/~nwclark/Compress-Zlib-Perl/Perl.pm
[3] http://search.cpan.org/~fays/Digest-Crc32/Crc32.pm
[4] http://tools.ietf.org/html/rfc1950
[5] http://tools.ietf.org/html/rfc1951
[6] http://tools.ietf.org/html/rfc1952

lua-compress-deflatelua's People

Contributors

davidm avatar drahosp 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.