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/Makefile.am b/lib/cpp/Makefile.am
index e0952dd..2f8d52a 100644
--- a/lib/cpp/Makefile.am
+++ b/lib/cpp/Makefile.am
@@ -1,4 +1,4 @@
-lib_LTLIBRARIES = libthrift.la libthriftnb.la
+lib_LTLIBRARIES = libthrift.la libthriftnb.la libthriftz.la
common_cxxflags = -Wall -Isrc $(BOOST_CPPFLAGS) $(EVENT_CPPFLAGS)
common_ldflags = -Wall $(BOOST_LDFLAGS) $(EVENT_LDFLAGS)
@@ -30,14 +30,18 @@
libthriftnb_sources = src/server/TNonblockingServer.cpp
+libthriftz_sources = src/transport/TZlibTransport.cpp
+
libthrift_la_SOURCES = $(libthrift_sources)
libthriftnb_la_SOURCES = $(libthriftnb_sources)
+libthriftz_la_SOURCES = $(libthriftz_sources)
libthrift_cxxflags = $(common_cxxflags)
libthrift_ldflags = $(common_ldflags)
libthrift_la_CXXFLAGS = $(libthrift_cxxflags)
libthriftnb_la_CXXFLAGS = $(libthrift_cxxflags)
+libthriftz_la_CXXFLAGS = $(libthrift_cxxflags)
include_thriftdir = $(includedir)/thrift
include_thrift_HEADERS = \
@@ -77,7 +81,8 @@
src/transport/TSocketPool.h \
src/transport/TTransport.h \
src/transport/TTransportException.h \
- src/transport/TTransportUtils.h
+ src/transport/TTransportUtils.h \
+ src/transport/TZlibTransport.h
include_serverdir = $(include_thriftdir)/server
include_server_HEADERS = \