Permalink
Browse files

documentation: added README and copyright/license info on each source…

… file

darcs-hash:20070418153922-e5a07-dac07375f4fd3ecf8d73ad9f202368a798e34d43.gz
  • Loading branch information...
1 parent 438bd10 commit af2fbc2c273fa3f0413f657e0d074573e3161337 @league committed Apr 18, 2007
@@ -1,8 +1,17 @@
+// BlockingIntQueue.java -- a bounded buffer with blocking threads
+// Copyright (c)2007 Christopher League <league@contrapunctus.net>
+
+// This is free software, but it comes with ABSOLUTELY NO WARRANTY.
+// GNU Lesser General Public License 2.1 or Common Public License 1.0
+
package net.contrapunctus.lzma;
import java.util.concurrent.Semaphore;
import java.io.PrintStream;
+// There is no mutex protecting producer_index and consumer_index,
+// because I expect precisely one producer and one consumer!
+
final class BlockingIntQueue
{
private int[] array;
@@ -1,3 +1,9 @@
+// ConcurrentBufferInputStream.java -- read bytes from blocking queue
+// Copyright (c)2007 Christopher League <league@contrapunctus.net>
+
+// This is free software, but it comes with ABSOLUTELY NO WARRANTY.
+// GNU Lesser General Public License 2.1 or Common Public License 1.0
+
package net.contrapunctus.lzma;
import java.io.IOException;
@@ -1,3 +1,9 @@
+// ConcurrentBufferOutputStream.java -- write bytes to blocking queue
+// Copyright (c)2007 Christopher League <league@contrapunctus.net>
+
+// This is free software, but it comes with ABSOLUTELY NO WARRANTY.
+// GNU Lesser General Public License 2.1 or Common Public License 1.0
+
package net.contrapunctus.lzma;
import java.io.IOException;
View
@@ -1,3 +1,9 @@
+// DecoderThread.java -- run LZMA decoder in a separate thread
+// Copyright (c)2007 Christopher League <league@contrapunctus.net>
+
+// This is free software, but it comes with ABSOLUTELY NO WARRANTY.
+// GNU Lesser General Public License 2.1 or Common Public License 1.0
+
package net.contrapunctus.lzma;
import SevenZip.Compression.LZMA.Decoder;
View
@@ -1,3 +1,9 @@
+// EncoderThread.java -- run LZMA encoder in a separate thread
+// Copyright (c)2007 Christopher League <league@contrapunctus.net>
+
+// This is free software, but it comes with ABSOLUTELY NO WARRANTY.
+// GNU Lesser General Public License 2.1 or Common Public License 1.0
+
package net.contrapunctus.lzma;
import SevenZip.Compression.LZMA.Encoder;
@@ -1,3 +1,9 @@
+// LzmaInputStream.java -- transparently decompress LZMA while reading
+// Copyright (c)2007 Christopher League <league@contrapunctus.net>
+
+// This is free software, but it comes with ABSOLUTELY NO WARRANTY.
+// GNU Lesser General Public License 2.1 or Common Public License 1.0
+
package net.contrapunctus.lzma;
import SevenZip.Compression.LZMA.Encoder;
@@ -1,3 +1,9 @@
+// LzmaOutputStream.java -- transparently compress LZMA while writing
+// Copyright (c)2007 Christopher League <league@contrapunctus.net>
+
+// This is free software, but it comes with ABSOLUTELY NO WARRANTY.
+// GNU Lesser General Public License 2.1 or Common Public License 1.0
+
package net.contrapunctus.lzma;
import java.io.ByteArrayOutputStream;
View
@@ -1,6 +1,6 @@
LZMA_SDK_VERSION = 4.43
LZMA_JIO_MAJOR = 0
-LZMA_JIO_MINOR = 7
+LZMA_JIO_MINOR = 8
LZMA_JIO_VERSION = $(LZMA_JIO_MAJOR).$(LZMA_JIO_MINOR)
JAR = jar
View
@@ -0,0 +1,37 @@
+LZMA Streams in Java
+
+Copyright (c)2007 Christopher League <league@contrapunctus.net>
+
+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.
View
@@ -1,3 +1,9 @@
+// RoundTrip.java -- a simple test program for LZMA in/out streams
+// Copyright (c)2007 Christopher League <league@contrapunctus.net>
+
+// This is free software, but it comes with ABSOLUTELY NO WARRANTY.
+// GNU Lesser General Public License 2.1 or Common Public License 1.0
+
package net.contrapunctus.lzma;
import java.io.*;
@@ -28,4 +34,4 @@ public static void main( String[] args ) throws IOException
System.out.println( k );
assert s.equals( k );
}
-}
+}
View
@@ -1,4 +1,10 @@
#! /usr/bin/perl
+# Version.pl -- create a class with detailed version information
+# Copyright (c)2007 Christopher League <league@contrapunctus.net>
+#
+# This is free software, but it comes with ABSOLUTELY NO WARRANTY.
+# GNU Lesser General Public License 2.1 or Common Public License 1.0
+
use strict;
my $MAJOR = shift;

0 comments on commit af2fbc2

Please sign in to comment.