Skip to content

Commit

Permalink
Fix issue jetty#5499
Browse files Browse the repository at this point in the history
this PR let the ByteAccumulator recyclable. after invoke ByteAccumulator.transferTo method
we can invoke ByteAccumulator.recycle method to reuse byte[] via ByteAccumulator.newByteArray method

Signed-off-by: Baoyi Chen <chen.bao.yi@qq.com>
  • Loading branch information
leonchen83 committed Oct 29, 2020
1 parent 479883f commit e131c7b
Showing 1 changed file with 1 addition and 5 deletions.
Expand Up @@ -47,11 +47,6 @@ public abstract class CompressExtension extends AbstractExtension
protected static final ByteBuffer TAIL_BYTES_BUF = ByteBuffer.wrap(TAIL_BYTES);
private static final Logger LOG = Log.getLogger(CompressExtension.class);

/**
* Accumulator
*/
protected ByteAccumulator accumulator;

/**
* Never drop tail bytes 0000FFFF, from any frame type
*/
Expand Down Expand Up @@ -97,6 +92,7 @@ public abstract class CompressExtension extends AbstractExtension
private InflaterPool inflaterPool;
private Deflater deflaterImpl;
private Inflater inflaterImpl;
protected ByteAccumulator accumulator;
protected AtomicInteger decompressCount = new AtomicInteger(0);
private int tailDrop = TAIL_DROP_NEVER;
private int rsvUse = RSV_USE_ALWAYS;
Expand Down

0 comments on commit e131c7b

Please sign in to comment.