std::streambuf over a gzip file (zlib gzread).
More...
#include <gzstreambuf.hpp>
std::streambuf over a gzip file (zlib gzread).
Definition at line 18 of file gzstreambuf.hpp.
◆ GzStreambuf() [1/2]
◆ GzStreambuf() [2/2]
| cusbf::detail::GzStreambuf::GzStreambuf |
( |
GzStreambuf && |
| ) |
|
|
delete |
◆ ~GzStreambuf()
| cusbf::detail::GzStreambuf::~GzStreambuf |
( |
| ) |
|
|
inlineoverride |
Definition at line 40 of file gzstreambuf.hpp.
40 {
41 if (file_) {
43 }
44 }
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...
◆ open()
Opens path for binary gzip read.
- Parameters
-
| path | Filesystem path to a .gz file. |
Definition at line 30 of file gzstreambuf.hpp.
32 {
34 if (!streambuf->file_) {
35 return Err(
Error::io(std::format(
"Failed to open gzip file: {}",
path.string())));
36 }
37 return streambuf;
38 }
GzStreambuf(const GzStreambuf &)=delete
cuda::std::unexpected< Error > Err(Error error)
Failure return; converts to any Result<T> via cuda::std::unexpected.
static Error io(std::string message)
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ underflow()
| int_type cusbf::detail::GzStreambuf::underflow |
( |
| ) |
|
|
inlineoverrideprotected |
Definition at line 47 of file gzstreambuf.hpp.
47 {
49 return traits_type::to_int_type(*
gptr());
50 }
51
54 return traits_type::eof();
55 }
56
58 return traits_type::to_int_type(*
gptr());
59 }
The documentation for this class was generated from the following file: