Calculate/validate bz2 (bzip2) CRC32 in Python
问题 I'm trying to calculate/validate the CRC32 checksums for compressed bzip2 archives. .magic:16 = 'BZ' signature/magic number .version:8 = 'h' for Bzip2 ('H'uffman coding) .hundred_k_blocksize:8 = '1'..'9' block-size 100 kB-900 kB .compressed_magic:48 = 0x314159265359 (BCD (pi)) .crc:32 = checksum for this block ... ... .eos_magic:48 = 0x177245385090 (BCD sqrt(pi)) .crc:32 = checksum for whole stream .padding:0..7 = align to whole byte http://en.wikipedia.org/wiki/Bzip2 So I know where the CRC