public void putNextEntryBytes(JBZipEntry entry, byte[] bytes) throws IOException {
    prepareNextEntry(entry);
    crc.reset();
    crc.update(bytes);
    entry.setCrc(crc.getValue());

    final byte[] outputBytes;
    final int outputBytesLength;
    if (entry.getMethod() == ZipEntry.DEFLATED) {
      def.setLevel(level);
      final BufferExposingByteArrayOutputStream compressedBytesStream = new BufferExposingByteArrayOutputStream();
      try (DeflaterOutputStream stream = new DeflaterOutputStream(compressedBytesStream, def)) {
        stream.write(bytes);
      }
      outputBytesLength = compressedBytesStream.size();
      outputBytes = compressedBytesStream.getInternalBuffer();
    }
    else {
      outputBytesLength = bytes.length;
      outputBytes = bytes;
    }

    entry.setCompressedSize(outputBytesLength);
    entry.setSize(bytes.length);
    writeLocalFileHeader(entry);
    writeOut(outputBytes, 0, outputBytesLength);
  }
public void putNextEntryBytes(JBZipEntry entry, byte[] bytes)