title: Why invalid entry size error has not occurred while using zip4j?
body: <p>I wrote some code for extracting ByteArray data stream, and I found an invalid entry size Exception occurred while I using the default <code>java.util.ZipInputStream</code>, but not occur in zip4j's <code>ZipInputStream</code></p>
  <pre class="lang-kotlin prettyprint-override"><code>fun extractToLocal(fileContent: ByteArray, directory: String): String {
      // in zip4j, this code works perfectly, but, if I use java.util.ZipStream here
      // the java.util.zip.ZipException: invalid entry size (expected 0 but got 57344 bytes) has occurred
      ZipInputStream(ByteArrayInputStream(fileContent)).use { zipInputStream -&gt;
          val zipEntry = zipInputStream.nextEntry
          val newFile = File(directory, zipEntry.fileName)
  
          newFile.outputStream().use { fileOutputStream -&gt;
              var len: Int
              while (zipInputStream.read().also { len = it } != -1) {
                  fileOutputStream.write(len)
              }
              fileOutputStream.flush()
          }
  
          return zipEntry.fileName
      }
  }
  </code></pre>
  <p>Of course each <code>ZipInputStream</code>'s <code>close</code> function is different, but I just wondered why even a similar exception has not occurred in zip4j.</p>
  <p>Am I using <code>zip4j</code> in the wrong way? Or is this just because of a difference between <code>zip4j</code> and <code>java.util.zip</code>'s memory allocation strategy?</p>
  <p>Thank you very much!</p>