When I run the following code on python3, the result of the filecmp() is False. Why is it so? I thought compressing twice the same file would output two files with the same exact content.
import filecmp
import shutil
import gzip
with open('base_file.fastq', 'rb') as f_in:
with gzip.open('compressed_one.fastq.gz', "wb") as f_out:
shutil.copyfileobj(f_in, f_out)
with open('base_file.fastq', 'rb') as f_in:
with gzip.open('compressed_two.fastq.gz', "wb") as f_out:
shutil.copyfileobj(f_in, f_out)
filecmp.cmp('compressed_one.fastq.gz', 'compressed_two.fastq.gz', shallow=False)