def _resume(self):
        # type: (Descriptor) -> int
        """Resume a download, if possible
        :param Descriptor self: this
        :rtype: int or None
        :return: verified download offset
        """
        if self._resume_mgr is None or self._offset > 0:
            return None
        # check if path exists in resume db
        rr = self._resume_mgr.get_record(self._dst_ase)
        if rr is None:
            logger.debug('no resume record for {}'.format(self._dst_ase.path))
            return None
        # ensure lengths are the same
        if rr.length != self._src_ase.size:
            logger.warning('resume length mismatch {} -> {}'.format(
                rr.length, self._src_ase.size))
            return None
        # compute replica factor
        if blobxfer.util.is_not_empty(self._dst_ase.replica_targets):
            replica_factor = 1 + len(self._dst_ase.replica_targets)
        else:
            replica_factor = 1
        # set offsets if completed
        if rr.completed:
            with self._meta_lock:
                logger.debug('{} upload already completed'.format(
                    self._dst_ase.path))
                self._offset = rr.offset
                self._src_block_list = rr.src_block_list
                self._chunk_num = rr.total_chunks
                self._chunk_size = rr.chunk_size
                self._total_chunks = rr.total_chunks
                self._completed_chunks.int = rr.completed_chunks
                self._outstanding_ops = 0
                return self._src_ase.size * replica_factor
        # re-hash from 0 to offset if needed
        _cc = bitstring.BitArray(length=rr.total_chunks)
        _cc.int = rr.completed_chunks
        curr_chunk = _cc.find('0b0')[0]
        del _cc
        # set values from resume
        with self._meta_lock:
            self._offset = rr.offset
            self._src_block_list = rr.src_block_list
            self._chunk_num = curr_chunk
            self._chunk_size = rr.chunk_size
            self._total_chunks = rr.total_chunks
            self._completed_chunks = bitstring.BitArray(length=rr.total_chunks)
            self._completed_chunks.set(True, range(0, curr_chunk + 1))
            self._outstanding_ops = (
                (rr.total_chunks - curr_chunk) * replica_factor
            )
            logger.debug(
                ('resuming file {} from byte={} chunk={} chunk_size={} '
                 'total_chunks={} outstanding_ops={}').format(
                     self._src_ase.path, self._offset, self._chunk_num,
                     self._chunk_size, self._total_chunks,
                     self._outstanding_ops))
            return rr.offset * replica_factor
Resume a download, if possible
        :param Descriptor self: this
        :rtype: int or None
        :return: verified download offset