We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5bb7daa commit 3ea743bCopy full SHA for 3ea743b
1 file changed
src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
@@ -180,10 +180,12 @@ public ZipArchiveOutputStream get() throws IOException {
180
* and writes it to the underlying StreamCompressor as raw (already-compressed) bytes.
181
*/
182
private class CompressorBridgeOutputStream extends OutputStream {
183
+ private final byte[] oneByte = new byte[1];
184
+
185
@Override
186
public void write(final int b) throws IOException {
- final byte[] buf = { (byte) b };
- write(buf, 0, 1);
187
+ oneByte[0] = (byte) (b & ZipConstants.BYTE_MASK);
188
+ write(oneByte, 0, 1);
189
}
190
191
0 commit comments