@Override
  public void close() throws IOException {
    try {
      if (codec != null) {
        if (isCodecFromPool && !isCodecFailure) {
          OrcCodecPool.returnCodec(compressionKind, codec);
        } else {
          codec.close();
        }
        codec = null;
      }
    } catch (Exception ex) {
      LOG.error("Ignoring error from codec", ex);
    } finally {
      dataReader.close();
    }
  }
Estimate the RowGroup offset given the next RG offset and isLast.

@param isCompressed is the RowGroup compressed
@param isLast is this the last RowGroup
@param nextGroupOffset the offset of the next RowGroup
@param streamLength the length of the whole Stream
@param bufferSize the size of the buffer
@return
ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java