Is it normal to have a smaller bam file after merging bam files?

I have 2 bam files that belong to the same sample and I merged them with samtools merge. And after merging, I realized that the merged version is a bit smaller than the sum of the other two separate files' size. I also wonder if I merged "the fastq" files of this sample first and convert it to bam would the result be the same?

• Perhaps the input was in .sam format and output in .bam? Jul 30, 2021 at 10:04
• @user438383 No, I had "the fastq" files but before getting ".bam files" I didn't know they belong to the same sample. So I converted them to ".sam" and then to ".bam" respectively. And now that I learned that they actually belong to the same sample I have to merge them. Jul 30, 2021 at 10:10
• Converting fastqs to bams is technically doable, but why? Do you mean merging the fastqs and realigning? Jul 30, 2021 at 16:15
• @swbarnes Yes, exactly. Jul 30, 2021 at 16:18