On Sat, 9 Mar 2024 at 18:19, Peter Hull <peterhul...@gmail.com> wrote: > There's another constructor for BZip2CompressorInputStream which > allows for this, it's not the default. Specifically, the patch below makes the test pass. Whether this should be default for the one-arg constructor is a matter for discussion. Peter diff --git a/src/test/java/org/apache/commons/compress/compressors/bzip2/BZip2Compress651Test.java b/src/test/java/org/apache/commons/compress/compressors/bzip2/BZip2Compress651Test.java index d5c7e17c9..079a90c37 100644 --- a/src/test/java/org/apache/commons/compress/compressors/bzip2/BZip2Compress651Test.java +++ b/src/test/java/org/apache/commons/compress/compressors/bzip2/BZip2Compress651Test.java @@ -38,13 +38,12 @@ public class BZip2Compress651Test {
@Test - @Disabled public void testCompress651() throws IOException { final int buffersize = 102_400; final Path pathIn = Paths.get("src/test/resources/org/apache/commons/compress/COMPRESS-651/my10m.tar.bz2"); final Path pathOut = Paths.get("target/COMPRESS-651/test.tar"); Files.createDirectories(pathOut.getParent()); - try (BZip2CompressorInputStream inputStream = new BZip2CompressorInputStream(new BufferedInputStream(Files.newInputStream(pathIn))); + try (BZip2CompressorInputStream inputStream = new BZip2CompressorInputStream(new BufferedInputStream(Files.newInputStream(pathIn)), true); OutputStream outputStream = Files.newOutputStream(pathOut)) { IOUtils.copy(inputStream, outputStream, buffersize); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org