pub fn seek_to_next_aligned(&mut self, last_read_len: usize, alignment: usize) -> Result<u64> {
        let suffix = last_read_len & (alignment - 1);
        let offset = if suffix == 0 { 0 } else { alignment - suffix };

        self.seek(SeekFrom::Current(offset as i64)).map_err(|e| {
            error!("Seeking to offset {} from current fails, {}", offset, e);
            e
        })
    }
/// Seek the reader to next aligned position.
Seek the reader to next aligned position.
Seek the reader to next aligned position .
pub fn seek_to_next_aligned(&mut self, last_read_len: usize, alignment: usize) -> Result<u64> {
        let suffix = last_read_len & (alignment - 1);
        let offset = if suffix == 0 { 0 } else { alignment - suffix };
        self.seek(SeekFrom::Current(offset as i64)).map_err(|e| {
            error!("Seeking to offset {} from current fails, {}", offset, e);
            e
        })
    }
pub fn seek_to_next_aligned ( & mut self , last_read_len : usize , alignment : usize ) -> Result < u64 > { let suffix = last_read_len & ( alignment - 1 ) ; let offset = if suffix == 0 { 0 } else { alignment - suffix } ; self . seek ( SeekFrom :: Current ( offset as i64 ) ) . map_err ( | e | { error ! ( " " offset e ) ; e } ) }
Seek the reader to next aligned position.
Seek the reader to next aligned position .
&mut self
last_read_len
usize
alignment
usize
&mut self
last_read_len
usize
alignment
usize