Thrift: Zlib transport.
Summary:
Add a new transport to the C++ library: TZLibTransport.
This wraps another transport (just like TBufferedTransport),
compresses the data written to it, and uncompresses the data it reads.
Reviewed By: mcslee
Test Plan:
For ax_lib_zlib.m4
- Ran ./bootstrap.sh.
- Looked at configure.
- Ran ./configure.
- Looked at config.status
- Ran ./configure --with-zlib=/usr.
- Looked at config.status
- Changed configure.ac to AC_LIB_ZLIB(1.2.4)
- Ran ./configure.
- Watched it fail.
For TZlibTransport
- test/ZlibTest.cpp
- Code coverage (hotness) report sent with review.
- 100% line coverage for all the good stuff.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665262 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/Thrift.h b/lib/cpp/src/Thrift.h
index 0b13bae..ad8d46c 100644
--- a/lib/cpp/src/Thrift.h
+++ b/lib/cpp/src/Thrift.h
@@ -26,8 +26,8 @@
namespace facebook { namespace thrift {
-class TOutput{
-public:
+class TOutput {
+ public:
TOutput() : f_(&perrorTimeWrapper) {}
inline void setOutputFunction(void (*function)(const char *)){
@@ -47,7 +47,7 @@
fprintf(stderr, "%s ", dbgtime);
perror(msg);
}
-private:
+ private:
void (*f_)(const char *);
};
@@ -58,7 +58,7 @@
}
class TException : public std::exception {
-public:
+ public:
TException() {}
TException(const std::string& message) :
@@ -74,13 +74,13 @@
}
}
-protected:
+ protected:
std::string message_;
};
class TApplicationException : public TException {
-public:
+ public:
/**
* Error codes for the various types of exceptions.
@@ -134,7 +134,7 @@
uint32_t read(protocol::TProtocol* iprot);
uint32_t write(protocol::TProtocol* oprot) const;
-protected:
+ protected:
/**
* Error code
*/