'Read the objects in this pack file.
:param compute_crc32: If True, compute the CRC32 of the compressed
data. If False, the returned CRC32 will be None.
:return: Iterator over UnpackedObjects with the following members set:
offset
obj_type_num
obj_chunks (for non-delta types)
delta_base (for delta types)
decomp_chunks
decomp_len
crc32 (if compute_crc32 is True)
:raise ChecksumMismatch: if the checksum of the pack contents does not
match the checksum in the pack trailer.
:raise zlib.error: if an error occurred during zlib decompression.
:raise IOError: if an error occurred writing to the output file.'

def read_objects(self, compute_crc32=False):

    (pack_version, self._num_objects) = read_pack_header(self.read)
    if (pack_version is None):
        return
    for i in range(self._num_objects):
        offset = self.offset
        (unpacked, unused) = unpack_object(self.read, read_some=self.recv, compute_crc32=compute_crc32, zlib_bufsize=self._zlib_bufsize)
        unpacked.offset = offset
        buf = BytesIO()
        buf.write(unused)
        buf.write(self._rbuf.read())
        buf.seek(0)
        self._rbuf = buf
        (yield unpacked)
    if (self._buf_len() < 20):
        self.read(20)
    pack_sha = bytearray(self._trailer)
    if (pack_sha != self.sha.digest()):
        raise ChecksumMismatch(sha_to_hex(pack_sha), self.sha.hexdigest())
