Skip to content

Commit

Permalink
Internal: Change LZFCompressedStreamOutput to use buffer recycler whe…
Browse files Browse the repository at this point in the history
…n allocating encoder

closes elastic#7613
  • Loading branch information
rjernst authored and s1monw committed Oct 16, 2014
1 parent e108610 commit 58c4a0b
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -28,8 +28,6 @@

import java.io.IOException;

/**
*/
public class LZFCompressedStreamOutput extends CompressedStreamOutput<LZFCompressorContext> {

private final BufferRecycler recycler;
Expand All @@ -40,7 +38,7 @@ public LZFCompressedStreamOutput(StreamOutput out) throws IOException {
this.recycler = BufferRecycler.instance();
this.uncompressed = this.recycler.allocOutputBuffer(LZFChunk.MAX_CHUNK_LEN);
this.uncompressedLength = LZFChunk.MAX_CHUNK_LEN;
this.encoder = ChunkEncoderFactory.safeInstance();
this.encoder = ChunkEncoderFactory.safeInstance(recycler);
}

@Override
Expand Down

0 comments on commit 58c4a0b

Please sign in to comment.