@Override
  public long skip(long toSkip) throws IOException {
    long pos = getPosition();
    while (getPosition() - pos < toSkip) {
      if (super.skip(toSkip) == 0) break;
    }
    return getPosition() - pos;
  }
@Override
  public long skip(long toSkip) throws IOException {
    long pos = getPosition();
    while (getPosition() - pos < toSkip) {
      if (super.skip(toSkip) == 0) break;
    }
    return getPosition() - pos;
  }
@ Override public long skip ( long toSkip ) throws IOException { long pos = getPosition ( ) ; while ( getPosition ( ) - pos < toSkip ) { if ( super . skip ( toSkip ) == 0 ) break ; } return getPosition ( ) - pos ; }
super.skip() skips uncompressed bytes, so we need to override it.
This allows us to specify skip size in a compressed stream.
super . skip () skips uncompressed bytes so we need to override it . This allows us to specify skip size in a compressed stream .