summaryrefslogtreecommitdiffstats
path: root/trace/record/client.h
diff options
context:
space:
mode:
Diffstat (limited to 'trace/record/client.h')
-rw-r--r--trace/record/client.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/trace/record/client.h b/trace/record/client.h
index b4a0c26..62ffdb5 100644
--- a/trace/record/client.h
+++ b/trace/record/client.h
@@ -42,6 +42,11 @@
#include <stdexcept>
#include <string>
#include <utility>
+#include <vector>
+
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#endif
class ErrnoException : public std::runtime_error {
public:
@@ -132,6 +137,25 @@ class Base64Filter : public Filter {
bool DecodeChar(int c, char **target);
};
+#ifdef HAVE_ZLIB_H
+class ZlibFilter : public Filter {
+ public:
+ ZlibFilter();
+
+ ZlibFilter(const ZlibFilter&) = default;
+
+ ZlibFilter& operator=(const ZlibFilter&) = default;
+
+ virtual ~ZlibFilter();
+
+ virtual bool Run(void** buf, size_t* n);
+
+ private:
+ z_stream stream_;
+ std::vector<Bytef> buffer_;
+};
+#endif
+
class Client {
public:
Client() = default;