Removing newlines in FASTA file increases ZSTD compression ratio by 10x
1–10 of 118 posts
Re: Removing newlines in FASTA file increases ZSTD compression ratio by 10x
#2Re: Removing newlines in FASTA file increases ZSTD compression ratio by 10x
#3This might in general be a good preprocessing step to check for punctuation repeating in fixed intervals and remove it, and restore after decompression.
Re: Removing newlines in FASTA file increases ZSTD compression ratio by 10x
#4Re: Removing newlines in FASTA file increases ZSTD compression ratio by 10x
#5Now I'm wondering why this works. DNA clearly has some interesting redundancy strategies. (it might also depend on genome?)
Depending on what you need to represent, you can get a 4x reduction in data size without compression at all, by just representing a GATC with 2 bits, rather than 8.
Compression on top of that "should" result in the same compressed size as the original text (after all, the "information" being compressed is the same), except that compression isn't perfect.
Newlines are an example of something that's "information" in the text format that isn't relevant, yet the compression scheme didn't know that.
Re: Removing newlines in FASTA file increases ZSTD compression ratio by 10x
#6This might in general be a good preprocessing step to check for punctuation repeating in fixed intervals and remove it, and restore after decompression.
Re: Removing newlines in FASTA file increases ZSTD compression ratio by 10x
#7Now I'm wondering why this works. DNA clearly has some interesting redundancy strategies. (it might also depend on genome?)
Re: Removing newlines in FASTA file increases ZSTD compression ratio by 10x
#8Now I'm wondering why this works. DNA clearly has some interesting redundancy strategies. (it might also depend on genome?)
The FASTA format stores nucleotides in text form... compression is used to make this tractable at genome sizes, but it's by no means perfect. Depending on what you need to represent, you can get a 4x reduction in data size without compression at all, by just representing a GATC with 2 bits, rather than 8. Compression on top of that "should" result in the same compressed size as the original text (after all, the "info…
Re: Removing newlines in FASTA file increases ZSTD compression ratio by 10x
#9Re: Removing newlines in FASTA file increases ZSTD compression ratio by 10x
#10What about a specialized dict for FASTA? Shouldn't it increase ZSTD compression significantly?