Re: RFR: 8341597: ZipFileInflaterInputStream input buffer size uses uncompressed size

2024-10-07 Thread Lance Andersen
On Sun, 6 Oct 2024 18:02:58 GMT, Eirik Bjørsnøs wrote: > Please review this PR which proposes to change the input buffer size of > `ZipFileInflaterInputStream` to be based on the _compressed_ size of a ZIP > entry instead of the _uncompressed_ size. This saves allocation since buffers > will n

Re: RFR: 8341597: ZipFileInflaterInputStream input buffer size uses uncompressed size

2024-10-07 Thread Eirik Bjørsnøs
On Mon, 7 Oct 2024 01:52:59 GMT, David Schlosnagle wrote: >> src/java.base/share/classes/java/util/zip/ZipFile.java line 417: >> >>> 415: if (size > 65536) { >>> 416: size = 8192; >>> 417: } >> >> Not sure if this clamping makes se

Re: RFR: 8341597: ZipFileInflaterInputStream input buffer size uses uncompressed size

2024-10-06 Thread David Schlosnagle
On Sun, 6 Oct 2024 19:17:24 GMT, Eirik Bjørsnøs wrote: >> Please review this PR which proposes to change the input buffer size of >> `ZipFileInflaterInputStream` to be based on the _compressed_ size of a ZIP >> entry instead of the _uncompressed_ size. This saves allocation since >> buffers wi

Re: RFR: 8341597: ZipFileInflaterInputStream input buffer size uses uncompressed size

2024-10-06 Thread Eirik Bjørsnøs
On Sun, 6 Oct 2024 18:02:58 GMT, Eirik Bjørsnøs wrote: > Please review this PR which proposes to change the input buffer size of > `ZipFileInflaterInputStream` to be based on the _compressed_ size of a ZIP > entry instead of the _uncompressed_ size. This saves allocation since buffers > will n

RFR: 8341597: ZipFileInflaterInputStream input buffer size uses uncompressed size

2024-10-06 Thread Eirik Bjørsnøs
Please review this PR which proposes to change the input buffer size of `ZipFileInflaterInputStream` to be based on the _compressed_ size of a ZIP entry instead of the _uncompressed_ size. This saves allocation since buffers will no longer be oversized: * The `size` parameter passed to the `Zip