Read-only contiguous file payload for in-memory FASTX parsing.
More...
#include <fastx_file_buffer.hpp>
Read-only contiguous file payload for in-memory FASTX parsing.
Definition at line 26 of file fastx_file_buffer.hpp.
◆ FastxFileBuffer() [1/3]
| cusbf::detail::FastxFileBuffer::FastxFileBuffer |
( |
| ) |
|
|
default |
◆ FastxFileBuffer() [2/3]
◆ FastxFileBuffer() [3/3]
| cusbf::detail::FastxFileBuffer::FastxFileBuffer |
( |
FastxFileBuffer && |
other | ) |
|
|
inlinenoexcept |
Definition at line 31 of file fastx_file_buffer.hpp.
31 {
32 *
this = std::move(
other);
33 }
consteval bool separatorPositionAlwaysEncodesInvalid(char *input, uint64_t separatorPosition, uint64_t index)
Recursively tests whether placing the separator byte at any position in an input of valid bytes alway...
◆ ~FastxFileBuffer()
| cusbf::detail::FastxFileBuffer::~FastxFileBuffer |
( |
| ) |
|
|
inline |
◆ data()
| std::string_view cusbf::detail::FastxFileBuffer::data |
( |
| ) |
const |
|
inlinenoexcept |
Contiguous read-only file bytes.
Definition at line 72 of file fastx_file_buffer.hpp.
72 {
73 return std::string_view{data_, size_};
74 }
◆ empty()
| bool cusbf::detail::FastxFileBuffer::empty |
( |
| ) |
const |
|
inlinenoexcept |
True when the file is empty or load produced no bytes.
Definition at line 77 of file fastx_file_buffer.hpp.
77 {
78 return size_ == 0;
79 }
◆ load()
Loads an uncompressed file via mmap (Linux) or read into memory.
- Parameters
-
| path | Path to a non-gzip FASTA/FASTQ file. |
- Returns
- Owning buffer with data() spanning the full file.
Definition at line 63 of file fastx_file_buffer.hpp.
65 {
66 auto buffer = std::make_unique<FastxFileBuffer>();
68 return buffer;
69 }
#define CUSBF_TRY(expr)
Propagates a cusbf::Result failure from the enclosing function (GNU statement expression).
◆ operator=() [1/2]
◆ operator=() [2/2]
Definition at line 35 of file fastx_file_buffer.hpp.
35 {
37 release();
38 owned_storage_ = std::move(
other.owned_storage_);
41#if defined(__linux__)
44 other.mapped_ =
nullptr;
45 other.mapped_size_ = 0;
46#endif
47 other.data_ =
nullptr;
49 }
50 return *this;
51 }
The documentation for this class was generated from the following file: