BioJulia / FASTX.jl

Parse and process FASTA and FASTQ formatted files of biological sequences.
https://biojulia.dev
MIT License
61 stars 20 forks source link

No good way to flush writers? #77

Closed jakobnissen closed 2 years ago

jakobnissen commented 2 years ago

We should have a way to flush a writer that does not close the underlying IO.

jakobnissen commented 2 years ago

Turns out it's super easy:

function Base.flush(writer::Writer)
    write(writer.output, TranscodingStreams.TOKEN_END)
    flush(writer.output)
end

I'll add it in the v2 PR