24 !std::is_copy_constructible_v<CFileGZInputStream> &&
25 !std::is_copy_assignable_v<CFileGZInputStream>,
51 if (
m_f->f) gzclose(
m_f->f);
58 error_msg.value().get() =
59 mrpt::format(
"Couldn't access the file '%s'", fileName.c_str());
64 m_f->f = gzopen(fileName.c_str(),
"rb");
65 if (
m_f->f ==
nullptr && error_msg)
66 error_msg.value().get() = std::string(strerror(errno));
68 return m_f->f !=
nullptr;
89 return gzread(
m_f->f, Buffer, Count);
93 [[maybe_unused]]
const void* Buffer, [[maybe_unused]]
size_t Count)
113 return gztell(
m_f->f);
122 return 0 != gzeof(
m_f->f);
TSeekOrigin
Used in CStream::Seek.
#define THROW_EXCEPTION(msg)
std::string std::string format(std::string_view fmt, ARGS &&... args)
std::optional< std::reference_wrapper< T > > optional_ref
Shorter name for std::optional<std::reference_wrapper<T>>
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
pimpl< T > make_impl(Args &&... args)
uint64_t getFileSize(const std::string &fileName)
Return the size of the given file, or size_t(-1) if some error is found accessing that file...