'Return the current position as a value that may be passed to
DataFileReader.seek(long). Forces the end of the current block,
emitting a synchronization marker.'

def sync(self):

    self._write_block()
    return self.writer.tell()
