unnaf/src/output-fastq.c
static void print_dna_from_memory_4bit(unsigned int len)
{
    unsigned int remaining_bp = len;
    while (remaining_bp > 0)
    {
        if (dna_buffer_remaining == 0) { refill_dna_buffer_from_memory_4bit(); }

        unsigned int n_bp_to_print = remaining_bp;
        if (n_bp_to_print > dna_buffer_remaining) { n_bp_to_print = dna_buffer_remaining; }

        fwrite(dna_buffer + dna_buffer_printing_pos, 1, n_bp_to_print, OUT);
        dna_buffer_printing_pos += n_bp_to_print;
        dna_buffer_remaining -= n_bp_to_print;
        remaining_bp -= n_bp_to_print;
    }
}
/*
 * NAF decompressor
 * Copyright (c) 2018-2021 Kirill Kryukov
 * See README.md and LICENSE files of this repository
 */
NAF decompressor
Copyright (c) 2018-2021 Kirill Kryukov
See README.md and LICENSE files of this repository
NAF decompressor Copyright ( c ) 2018 - 2021 Kirill Kryukov See README . md and LICENSE files of this repository
static void print_dna_from_memory_4bit(unsigned int len)
{
    unsigned int remaining_bp = len;
    while (remaining_bp > 0)
    {
        if (dna_buffer_remaining == 0) { refill_dna_buffer_from_memory_4bit(); }
        unsigned int n_bp_to_print = remaining_bp;
        if (n_bp_to_print > dna_buffer_remaining) { n_bp_to_print = dna_buffer_remaining; }
        fwrite(dna_buffer + dna_buffer_printing_pos, 1, n_bp_to_print, OUT);
        dna_buffer_printing_pos += n_bp_to_print;
        dna_buffer_remaining -= n_bp_to_print;
        remaining_bp -= n_bp_to_print;
    }
}
static void print_dna_from_memory_4bit ( unsigned int len ) { unsigned int remaining_bp = len ; while ( remaining_bp > 0 ) { if ( dna_buffer_remaining == 0 ) { refill_dna_buffer_from_memory_4bit ( ) ; } unsigned int n_bp_to_print = remaining_bp ; if ( n_bp_to_print > dna_buffer_remaining ) { n_bp_to_print = dna_buffer_remaining ; } fwrite ( dna_buffer + dna_buffer_printing_pos , 1 , n_bp_to_print , OUT ) ; dna_buffer_printing_pos += n_bp_to_print ; dna_buffer_remaining -= n_bp_to_print ; remaining_bp -= n_bp_to_print ; } }
NAF decompressor
 Copyright (c) 2018-2021 Kirill Kryukov
 See README.md and LICENSE files of this repository
NAF decompressor Copyright ( c ) 2018 - 2021 Kirill Kryukov See README . md and LICENSE files of this repository