summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorljfa-ag <ljfa-ag@web.de>2015-09-15 11:43:22 +0200
committerljfa-ag <ljfa-ag@web.de>2015-09-15 12:04:09 +0200
commit82efd65efe324e0a78425b57bff255653db2c92b (patch)
tree0be9705fc22f74efdd8458dd77a39d79c9d6a3c7
parenta692b3be10084aec02a5b6483c878e1dc20081f2 (diff)
downloadProject-Tick-82efd65efe324e0a78425b57bff255653db2c92b.tar.gz
Project-Tick-82efd65efe324e0a78425b57bff255653db2c92b.zip
Add more doxygen to inflate_streambuf
-rw-r--r--include/io/izlibstream.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/io/izlibstream.h b/include/io/izlibstream.h
index 2b67003232..edf632eddf 100644
--- a/include/io/izlibstream.h
+++ b/include/io/izlibstream.h
@@ -29,11 +29,21 @@ namespace zlib
/**
* @brief Stream buffer used by zlib::izlibstream
- * @see izlibstream
+ * @sa izlibstream
*/
class inflate_streambuf : public std::streambuf
{
public:
+ /**
+ * @param input the istream to wrap
+ * @param bufsize the size of the internal buffers
+ * @param window_bits the base two logarithm of the maximum window size that
+ * zlib will use. This parameter also determines which type of input to expect.
+ * The default argument will autodetect between zlib and gzip data.
+ * Refer to the zlib documentation of inflateInit2 for more details.
+ *
+ * @throw zlib_error if zlib encounters a problem during initialization
+ */
explicit inflate_streambuf(std::istream& input, size_t bufsize = 32768, int window_bits = 32 + 15);
~inflate_streambuf() noexcept;
@@ -41,6 +51,7 @@ public:
inflate_streambuf(const inflate_streambuf&) = delete;
inflate_streambuf& operator=(const inflate_streambuf&) = delete;
+ ///@return the wrapped istream
std::istream& get_istr() const { return is; }
private:
@@ -58,13 +69,15 @@ private:
*
* This istream wraps another istream. The izlibstream will read compressed
* data from the wrapped istream and inflate (decompress) it with zlib.
+ *
+ * @sa inflate_streambuf
*/
class izlibstream : public std::istream
{
public:
/**
* @param input the istream to wrap
- * @param bufsize the size of the internal buffer
+ * @param bufsize the size of the internal buffers
*/
explicit izlibstream(std::istream& input, size_t bufsize = 32768):
buf(input, bufsize)