klaren opened a new pull request, #368:
URL: https://github.com/apache/commons-compress/pull/368

   I wrote a test to reproduce the issue, writing to a `NullOutputStream`, but 
that turned out to be really slow due to the forced 512 bytes chunking. So I 
opted to not include that.
   
   ```java
       @Test
       public void testWritingBigFile() throws Exception {
           final TarArchiveEntry t = new TarArchiveEntry("foo");
           t.setSize((Integer.MAX_VALUE + 1L) * TarConstants.DEFAULT_RCDSIZE);
           final TarArchiveOutputStream tos = new 
TarArchiveOutputStream(NullOutputStream.NULL_OUTPUT_STREAM);
           tos.setBigNumberMode(TarArchiveOutputStream.BIGNUMBER_POSIX);
           tos.putArchiveEntry(t);
   
           byte[] bytes = new byte[TarConstants.DEFAULT_RCDSIZE];
           for (int i = 0; i < Integer.MAX_VALUE; i++) {
               tos.write(bytes);
           }
           tos.closeArchiveEntry();
           tos.close();
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to