[
https://issues.apache.org/jira/browse/COMPRESS-566?focusedWorklogId=555031&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-555031
]
ASF GitHub Bot logged work on COMPRESS-566:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 20/Feb/21 02:07
Start Date: 20/Feb/21 02:07
Worklog Time Spent: 10m
Work Description: PeterAlfredLee commented on a change in pull request
#168:
URL: https://github.com/apache/commons-compress/pull/168#discussion_r579572525
##########
File path:
src/main/java/org/apache/commons/compress/compressors/gzip/GzipParameters.java
##########
@@ -118,4 +120,28 @@ public int getOperatingSystem() {
public void setOperatingSystem(final int operatingSystem) {
this.operatingSystem = operatingSystem;
}
+
+ /**
+ * Gets size of the buffer used to retrieve compressed data.
+ * @return The size of the buffer used to retrieve compressed data.
+ * @since 1.21
+ * @see #setBufferSize(int)
+ */
+ public int getBufferSize() {
+ return this.bufferSize;
+ }
+
+ /**
+ * Sets size of the buffer used to retrieve compressed data from
+ * {@link Deflater} and write to underlying {@link OutputStream}.
+ *
+ * @param bufferSize the bufferSize to set. Must be a positive value.
+ * @since 1.21
+ */
+ public void setBufferSize(int bufferSize) {
+ if (bufferSize <= 0) {
Review comment:
Do we need a high limit check for `bufferSize` here?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 555031)
Time Spent: 1h (was: 50m)
> make gzip deflate buffer size configurable
> ------------------------------------------
>
> Key: COMPRESS-566
> URL: https://issues.apache.org/jira/browse/COMPRESS-566
> Project: Commons Compress
> Issue Type: Improvement
> Components: Compressors
> Reporter: Brett Okken
> Priority: Minor
> Time Spent: 1h
> Remaining Estimate: 0h
>
> The deflateBuffer in GzipCompressorOutputStream is hardcoded to 512.
> It would be good if this could be configurable in GzipParameters.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)