23 bool read(
void* buf,
size_t len)
override;
24 bool skip(
size_t n)
override;
39 return is_compressed() ? path().substr(0, path().size() - 3) : path();
47 void* file_ =
nullptr;
size_t gzread_checked(void *buf, size_t len)
MaybeGzipped(const std::string &path)
std::unique_ptr< AnyStream > create_stream()
bool is_compressed() const
CharArray uncompress_into_buffer(size_t limit=0)
std::string basepath() const
fail(), unreachable() and __declspec/__attribute__ macros
GEMMI_DLL const char *const zlib_description
GEMMI_DLL size_t estimate_uncompressed_size(const std::string &path)
bool iends_with(const std::string &str, const std::string &suffix)
bool skip(size_t n) override
bool read(void *buf, size_t len) override
char * gets(char *line, int size) override
std::string read_rest() override
Utilities. Mostly for working with strings and vectors.