private void updateCrc(Buffer buffer,long offset,long byteCount){
  Segment s=buffer.head;
  for (; offset >= (s.limit - s.pos); s=s.next) {
    offset-=(s.limit - s.pos);
  }
  for (; byteCount > 0; s=s.next) {
    int pos=(int)(s.pos + offset);
    int toUpdate=(int)Math.min(s.limit - pos,byteCount);
    crc.update(s.data,pos,toUpdate);
    byteCount-=toUpdate;
    offset=0;
  }
}

private void updateCrc ( Buffer buffer , long offset , long byteCount ) { Segment s = buffer . head ; for ( ; offset >= ( s . limit - s . pos ) ; s = s . next ) { offset -= ( s . limit - s . pos ) ; } for ( ; byteCount > 0 ; s = s . next ) { int pos = ( int ) ( s . pos + offset ) ; int toUpdate = ( int ) Math . min ( s . limit - pos , byteCount ) ; crc . update ( s . data , pos , toUpdate ) ; byteCount -= toUpdate ; offset = 0 ; } }
updates the crc with the given bytes .
