#NEWLINE# def output_chunk( out , chunk_type , data ) : #NEWLINE# #INDENT# out . write ( struct . pack ( '!I' , len ( data ) ) ) #NEWLINE# out . write ( chunk_type ) #NEWLINE# out . write ( data ) #NEWLINE# checksum = zlib . crc32 ( chunk_type , zlib . crc32 ( chunk_type ) ) #NEWLINE# out . write ( struct . pack ( '!i' , checksum ) )