Home | History | Annotate | Download | only in python2.7

Lines Matching refs:CRC

281             'CRC',
325 # CRC CRC-32 of the uncompressed file
336 CRC = compress_size = file_size = 0
338 CRC = self.CRC
363 self.compress_type, dostime, dosdate, CRC,
434 """Generate a CRC-32 table.
443 crc = i
445 if crc & 1:
446 crc = ((crc >> 1) & 0x7FFFFFFF) ^ poly
448 crc = ((crc >> 1) & 0x7FFFFFFF)
449 table[i] = crc
453 def _crc32(self, ch, crc):
455 return ((crc >> 8) & 0xffffff) ^ self.crctable[(crc ^ ord(ch)) & 0xff]
549 if hasattr(zipinfo, 'CRC'):
550 self._expected_crc = zipinfo.CRC
636 # Update the CRC using the given data.
638 # No need to compute the CRC if we don't have a reference value
641 # Check the CRC if we're at the end of the file
643 raise BadZipfile("Bad CRC-32 for file %r" % self.name)
846 x.CRC, x.compress_size, x.file_size) = centdir[1:12]
888 """Read all the files and check the CRC."""
895 while f.read(chunk_size): # Check CRC-32
991 # completely random, while the 12th contains the MSB of the CRC,
1000 # compare against the CRC otherwise
1001 check_byte = (zinfo.CRC >> 24) & 0xff
1143 zinfo.CRC = 0
1150 # Must overwrite CRC and sizes with correct data later
1151 zinfo.CRC = CRC = 0
1168 CRC = crc32(buf, CRC) & 0xffffffff
1180 zinfo.CRC = CRC
1188 # correct CRC and file sizes)
1220 zinfo.CRC = crc32(bytes) & 0xffffffff # CRC-32 checksum
1235 # Write CRC and file sizes after the file data
1237 self.fp.write(struct.pack(fmt, zinfo.CRC, zinfo.compress_size,
1298 zinfo.CRC, compress_size, file_size,
1307 zinfo.CRC, compress_size, file_size,