|
cuSBF
|
FASTA/FASTQ parser over a contiguous in-memory buffer. More...
#include <fastx_buffer_reader.hpp>
Public Member Functions | |
| FastxBufferReader (std::string_view data, std::string_view source_name="<buffer>") | |
| Constructs a reader over a contiguous in-memory FASTA/FASTQ buffer. | |
| Result< bool > | nextRecord (FastxRecord &record) |
Reads the next record into record. | |
| std::string_view | buffer () const noexcept |
| Entire mmap or owned buffer backing this reader. | |
| Result< std::optional< RecordRange > > | appendNextRecord (FastxRecord &record, std::string &sequence, std::string_view &buffer) |
| Parses one record with optional zero-copy sequence views for single-line FASTA. | |
FASTA/FASTQ parser over a contiguous in-memory buffer.
Definition at line 15 of file fastx_buffer_reader.hpp.
|
inlineexplicit |
Constructs a reader over a contiguous in-memory FASTA/FASTQ buffer.
| data | Entire file or chunk payload. |
| source_name | Label used in parse error messages. |
Definition at line 23 of file fastx_buffer_reader.hpp.
|
inline |
Parses one record with optional zero-copy sequence views for single-line FASTA.
When the sequence fits one mmap line, returns a RecordRange into buffer instead of appending to sequence. Otherwise appends sequence bytes to sequence and returns an owned range offset.
| record | Output header (sequence may stay empty on zero-copy path). |
| sequence | Growing buffer for multi-line or owned FASTA sequence data. |
| buffer | Set to the full mmap view on first zero-copy record. |
std::nullopt at end-of-buffer, or an error. Definition at line 91 of file fastx_buffer_reader.hpp.
|
inlinenoexcept |
Entire mmap or owned buffer backing this reader.
Definition at line 74 of file fastx_buffer_reader.hpp.
|
inline |
Reads the next record into record.
| record | Output record, cleared before fill. |
false at end-of-buffer, true when a record was read, or an error. Definition at line 32 of file fastx_buffer_reader.hpp.