PeterAlfredLee commented on pull request #214: URL: https://github.com/apache/commons-compress/pull/214#issuecomment-892478291
> Note that for [COMPRESS-585](https://issues.apache.org/jira/browse/COMPRESS-585) I propose removing the limit to the max bytes read to COPY_BUF_SIZE altogether (the same as the `IOUtils.readRange(InputStream,int)` method) because the calling code does not expect the method to return less than `len` bytes unless EOF is encountered. > > With the limit removed we can use the [f8587ff](https://github.com/apache/commons-compress/commit/f8587ff16469bcda58db57baafabc9e4639e7f93) version. No. The `COPY_BUF_SIZE` is not a limit. It's just a limit of the buffer's size. Note that the `ByteBuffer b` is just a buffer for copying the bytes. That's why the `rewind` is nessary here - we can not always ensure the `len` is less than `COPY_BUF_SIZE`. -- 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]
