1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
Description: using the classes of libjbzip2-java as a replacement for Bzip2*
Author: Pierre Gruet <pgt@debian.org>
Forwarded: not-needed
Last-Update: 2021-08-04
--- a/goby-distribution/src/main/java/org/campagnelab/goby/compression/BZip2ChunkCodec.java
+++ b/goby-distribution/src/main/java/org/campagnelab/goby/compression/BZip2ChunkCodec.java
@@ -19,8 +19,8 @@
package org.campagnelab.goby.compression;
import com.google.protobuf.Message;
-import org.apache.tools.bzip2.CBZip2InputStream;
-import org.apache.tools.bzip2.CBZip2OutputStream;
+import org.itadaki.bzip2.BZip2InputStream;
+import org.itadaki.bzip2.BZip2OutputStream;
import java.io.*;
@@ -76,7 +76,7 @@
byteBuffer.write(magicSignature);
- final OutputStream bZip2OutputStream = new CBZip2OutputStream(byteBuffer);
+ final OutputStream bZip2OutputStream = new BZip2OutputStream(byteBuffer);
readCollection.writeTo(bZip2OutputStream);
bZip2OutputStream.flush();
bZip2OutputStream.close();
@@ -93,7 +93,7 @@
}
// remove the magic numbers:
- final CBZip2InputStream uncompressStream = new CBZip2InputStream(new ByteArrayInputStream(bytes, 3, bytes.length));
+ final BZip2InputStream uncompressStream = new BZip2InputStream(new ByteArrayInputStream(bytes, 3, bytes.length), false);
try {
return parser.parse(uncompressStream);
} finally {
--- a/goby-io/pom.xml
+++ b/goby-io/pom.xml
@@ -451,6 +451,14 @@
<version>debian</version>
</dependency>
+ <dependency>
+ <groupId>org.itadaki</groupId>
+ <artifactId>bzip2</artifactId>
+ <version>0.9.1</version>
+ <scope>system</scope>
+ <systemPath>/usr/share/java/jbzip2-0.9.1.jar</systemPath>
+ </dependency>
+
</dependencies>
</project>
|