Giter VIP home page Giter VIP logo

lzmajio's Introduction

LZMA Streams in Java

Copyright (c)2007 Christopher League <[email protected]>

The Lempel-Ziv Markov-chain Algorithm is a very effective and
relatively fast compression technique used in the '7z' format of the
7-Zip archiver.  Implementations of LZMA in C/C++, Java, C#, Python,
and other languages.

I needed a Java implementation of LZMA for a particular project.  In
Java, there is a quasi-standard for FilterOutputStreams -- streams
that transparently compress or encrypt data sent to them (and in
reverse for FilterInputStreams).  Unfortunately, the SevenZip
implementation did not conform to this standard.  It was written in a
completely different (and far more natural!) style.

So, the package net.contrapunctus.lzma provides implementations of
LzmaInputStream and LzmaOutputStream that interact with underlying
LZMA encoders and decoders running in separate threads.  This way I
could get the desired interface without having to restructure the LZMA
implementation, which would undoubtedly introduce bugs.

The Jar file available for download includes the compiled classes for
the (unmodified) LZMA SDK and for my interface, so that may be all you
need.  Try this, for a simple test:

  $ java -cp lzma-4.43-jio-0.7.jar net.contrapunctus.lzma.RoundTrip

It should show some compressed bytes and output a short text message
twice.

There is more work to be done.  Currently, many of the compression
parameters available for configuring the underlying Encoder are
hard-coded in LzmaOutputStream.  This may decrease compatibility
between streams written with and without my interface.  Please don't
hesitate to contact me with any bug reports, questions, or feature
requests.

lzmajio's People

Contributors

league avatar

Stargazers

 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.