@Test public void testWrite_GapAndCompressionAndGap() throws IOException { stream = new PartiallyCompressingOutputStream( Collections.singletonList(COMPRESS_RANGE_1), outBuffer, 32768); byte[] input = fuse(PREAMBLE_BYTES, ENTRY1.getUncompressedBinaryContent(), GAP1_BYTES); byte[] expected = fuse(PREAMBLE_BYTES, ENTRY1.getCompressedBinaryContent(), GAP1_BYTES); stream.write(input); stream.flush(); Assert.assertArrayEquals(expected, outBuffer.toByteArray()); }
@Override public void write(int b) throws IOException { internalCopyBuffer[0] = (byte) b; write(internalCopyBuffer, 0, 1); }
PartiallyCompressingOutputStream extends FilterOutputStream { @Override public void write(int b) throws IOException { internalCopyBuffer[0] = (byte) b; write(internalCopyBuffer, 0, 1); } }
PartiallyCompressingOutputStream extends FilterOutputStream { @Override public void write(int b) throws IOException { internalCopyBuffer[0] = (byte) b; write(internalCopyBuffer, 0, 1); } PartiallyCompressingOutputStream(
      List<TypedRange<JreDeflateParameters>> compressionRanges,
      OutputStream out,
      int compressionBufferSize); }
PartiallyCompressingOutputStream extends FilterOutputStream { @Override public void write(int b) throws IOException { internalCopyBuffer[0] = (byte) b; write(internalCopyBuffer, 0, 1); } PartiallyCompressingOutputStream(
      List<TypedRange<JreDeflateParameters>> compressionRanges,
      OutputStream out,
      int compressionBufferSize); @Override void write(int b); @Override void write(byte[] buffer); @Override void write(byte[] buffer, int offset, int length); }
PartiallyCompressingOutputStream extends FilterOutputStream { @Override public void write(int b) throws IOException { internalCopyBuffer[0] = (byte) b; write(internalCopyBuffer, 0, 1); } PartiallyCompressingOutputStream(
      List<TypedRange<JreDeflateParameters>> compressionRanges,
      OutputStream out,
      int compressionBufferSize); @Override void write(int b); @Override void write(byte[] buffer); @Override void write(byte[] buffer, int offset, int length);  }