@Override
  public void reinit(@Nullable Compression.HFileDecompressionContext newHFileDecompressionContext) {
    if (newHFileDecompressionContext != null) {
      if (newHFileDecompressionContext instanceof ZstdHFileDecompressionContext) {
        ZstdHFileDecompressionContext zstdContext =
          (ZstdHFileDecompressionContext) newHFileDecompressionContext;
        allowByteBuffDecompression = zstdContext.isAllowByteBuffDecompression();
        if (zstdContext.getDict() == null && dictId != 0) {
          ctx.loadDict((byte[]) null);
          dictId = 0;
        } else if (zstdContext.getDictId() != dictId) {
          this.ctx.loadDict(zstdContext.getDict());
          this.dictId = zstdContext.getDictId();
        }
      } else {
        throw new IllegalArgumentException(
          "ZstdByteBuffDecompression#reinit() was given an HFileDecompressionContext that was not "
            + "a ZstdHFileDecompressionContext, this should never happen");
      }
    }
  }
Glue for ByteBuffDecompressor on top of zstd-jni
hbase-compression/hbase-compression-zstd/src/main/java/org/apache/hadoop/hbase/io/compress/zstd/ZstdByteBuffDecompressor.java