From d3dfec6f52d8093db276adb62021ced8f58e590c Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Sun, 5 Nov 2023 12:17:03 +0100 Subject: Added lazy loading to images --- _posts/2019-01-03-encoding-binary-data-into-dna-sequence.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to '_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md') diff --git a/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md b/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md index 0bb774e..1de83af 100644 --- a/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md +++ b/_posts/2019-01-03-encoding-binary-data-into-dna-sequence.md @@ -110,7 +110,7 @@ The nucleotide in DNA consists of a sugar (deoxyribose), one of four bases Cytosine and thymine are pyrimidine bases, while adenine and guanine are purine bases. The sugar and the base together are called a nucleoside. -![DNA](/assets/posts/dna-sequence/dna-basics.jpg) +![DNA](/assets/posts/dna-sequence/dna-basics.jpg){:loading="lazy"} *DNA (a) forms a double stranded helix, and (b) adenine pairs with thymine and cytosine pairs with guanine. (credit a: modification of work by Jerome Walker, Dennis Myts)* @@ -300,7 +300,7 @@ Then we encode FASTA file from previous operation to encode this data into PNG. After encoding into PNG format this file looks like this. -![Encoded Quote in PNG format](/assets/posts/dna-sequence/quote.png) +![Encoded Quote in PNG format](/assets/posts/dna-sequence/quote.png){:loading="lazy"} The larger the input stream is the larger the PNG file would be. Compiled basic Hello World C program with @@ -369,7 +369,7 @@ dd if=<(openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count= ``` -![Sample binary file 1KB](/assets/posts/dna-sequence/sample-binary-file.png) +![Sample binary file 1KB](/assets/posts/dna-sequence/sample-binary-file.png){:loading="lazy"} Our freshly generated 1KB file looks something like this (its full of garbage data as intended). @@ -395,10 +395,10 @@ Then we GZIP all the FASTA files to see how much the can be compressed. gzip -9 < 10MB.fa > 10MB.fa.gz ``` -![Encode to FASTA](/assets/posts/dna-sequence/chart-speed.svg) +![Encode to FASTA](/assets/posts/dna-sequence/chart-speed.svg){:loading="lazy"} The speed increase that occurs when encoding to FASTA format. -![File sizes](/assets/posts/dna-sequence/chart-size.svg) +![File sizes](/assets/posts/dna-sequence/chart-size.svg){:loading="lazy"} Size of the out file after encoding. [Download CSV file with benchmarks](/assets/posts/dna-sequence/benchmarks.csv). -- cgit v1.2.3