private OrcProto.StripeFooter buildStripeFooter(
      BufferChunk bcs, int len, CompressionCodec codec, int bufferSize) throws IOException {
    InStream.StreamOptions options = null;
    if (codec != null) {
      options = InStream.options()
          .withCodec(OrcCodecPool.getCodec(codec.getKind())).withBufferSize(bufferSize);
    }
    return OrcProto.StripeFooter.parseFrom(InStream.createCodedInputStream(
        InStream.create("footer",  new BufferChunk(bcs.getData(), 0), 0, len, options)));
  }
Utility function to produce a deseralized OrcTail instance from LLAP buffers retrieved from metadata cache.
Expects buffers are already locked before invocation, and caller releases them thereafter.
@param tailBuffers
@return
@throws IOException
llap-server/src/java/org/apache/hadoop/hive/llap/io/encoded/OrcEncodedDataReader.java