diff --git a/include/ZlibDecompressor.h b/include/ZlibDecompressor.h index 19fac3f..1bf1ff2 100644 --- a/include/ZlibDecompressor.h +++ b/include/ZlibDecompressor.h @@ -1,24 +1,21 @@ #pragma once -#include -#include +#include #include "types.h" - class ZlibDecompressor { public: - class DecompressError { - }; + class DecompressError : std::exception {}; - ZlibDecompressor(const unsigned char *data, std::size_t size); + ZlibDecompressor(const u8 *data, size_t size); ~ZlibDecompressor(); - void setSeekPos(std::size_t seekPos); - std::size_t seekPos() const; + void setSeekPos(size_t seekPos); + size_t seekPos() const; ustring decompress(); private: - const unsigned char *m_data; - std::size_t m_seekPos; - std::size_t m_size; + const u8 *m_data; + size_t m_seekPos; + size_t m_size; }; diff --git a/include/ZstdDecompressor.h b/include/ZstdDecompressor.h index 653bf43..861481e 100644 --- a/include/ZstdDecompressor.h +++ b/include/ZstdDecompressor.h @@ -1,13 +1,12 @@ #pragma once -#include -#include +#include #include "types.h" class ZstdDecompressor { public: - class DecompressError {}; + class DecompressError : std::exception {}; ZstdDecompressor(); ~ZstdDecompressor();