bokken commented on a change in pull request #168:
URL: https://github.com/apache/commons-compress/pull/168#discussion_r579686912
##########
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:
I personally do not see the value, but can add if desired.
There is certainly some threshold where larger values are counter
productive, but my opinion is consumers can determine that on their own.
----------------------------------------------------------------
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]