Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHillyard committed Jun 24, 2022
1 parent 96e09e6 commit 90634d9
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public class GZipEncoder extends AbstractTransformer<Buffer, Buffer> {
private static final int TRAILER_SIZE = 8;

private final int bufferSize;
private static int compressionLevel;
private static int compressionStrategy;
private final int compressionLevel;
private final int compressionStrategy;

private static final Buffer header;

Expand Down Expand Up @@ -112,7 +112,7 @@ protected TransformationResult<Buffer, Buffer> transformImpl(AttributeStorage st
final GZipOutputState state = (GZipOutputState) obtainStateObject(storage);

if (!state.isInitialized) {
state.initialize();
state.initialize(compressionLevel, compressionStrategy);
}

Buffer encodedBuffer = null;
Expand Down Expand Up @@ -290,7 +290,7 @@ protected static final class GZipOutputState extends LastResultAwareState<Buffer
*/
private Deflater deflater;

private void initialize() {
private void initialize(int compressionLevel, int compressionStrategy) {
final Deflater newDeflater = new Deflater(compressionLevel, true);
newDeflater.setStrategy(compressionStrategy);
final CRC32 newCrc32 = new CRC32();
Expand Down

0 comments on commit 90634d9

Please sign in to comment.