@@ -0,0 +1,1031 @@
+/*%0A * Copyright (c) Facebook, Inc. and its affiliates.%0A *%0A * This source code is licensed under the MIT license found in the%0A * LICENSE file in the root directory of this source tree.%0A */%0A%0Apackage com.facebook.common.memory;%0A%0Aimport androidx.annotation.Nullable;%0Aimport androidx.core.util.Pools;%0Aimport com.facebook.infer.annotation.Nullsafe;%0Aimport java.nio.ByteBuffer;%0A%0A@Nullsafe(Nullsafe.Mode.LOCAL)%0Apublic class DecodeBufferHelper implements Pools.Pool%3CByteBuffer%3E %7B%0A%0A  public static final DecodeBufferHelper INSTANCE = new DecodeBufferHelper();%0A%0A  public static final int DEFAULT_DECODE_BUFFER_SIZE = 16 * 1024;%0A%0A  private static final ThreadLocal%3CByteBuffer%3E sBuffer =%0A      new ThreadLocal%3CByteBuffer%3E() %7B%0A        @Override%0A        protected ByteBuffer initialValue() %7B%0A          return ByteBuffer.allocate(DEFAULT_DECODE_BUFFER_SIZE);%0A        %7D%0A      %7D;%0A%0A  @Override%0A  public @Nullable ByteBuffer acquire() %7B%0A    return sBuffer.get();%0A  %7D%0A%0A  @Override%0A  public boolean release(ByteBuffer instance) %7B%0A    return true;%0A  %7D%0A%7D%0A

Add decode buffer helper