CARMA C++
ProtoBufUtil.h
1 #ifndef CARMA_UI_RTD_COMMON_PROTOBUFUTIL_H
2 #define CARMA_UI_RTD_COMMON_PROTOBUFUTIL_H
3 
4 #include <google/protobuf/message.h>
5 #include <stdint.h>
6 #include <string>
7 
8 namespace carma {
9 namespace ui {
10 namespace rtd {
11 
19 void compressLZMA(const std::string &src, const uint32_t level, std::string &dst);
20 
27 void decompressLZMA(const std::string &src, std::string &dst);
28 
36 void compressZLIB(const std::string &src, const uint32_t level, std::string &dst);
37 
44 void decompressZLIB(const std::string &src, std::string &dst);
45 
51 bool serializeMessageToStdout(const ::google::protobuf::Message &msg, bool compress = true);
52 
53 } // namespace carma::ui::rtd
54 } // namespace carma::ui
55 } // namespace carma
56 
57 #endif /* CARMA_UI_RTD_COMMON_PROTOBUFUTIL_H */
58 
59 /* vim: set ts=4 sts=4 sw=4 et tw=80: */
void compressZLIB(const std::string &src, const uint32_t level, std::string &dst)
Compress a buffer of bytes using ZLIB.
void decompressZLIB(const std::string &src, std::string &dst)
Decompress a buffer of bytes using ZLIB.
void compressLZMA(const std::string &src, const uint32_t level, std::string &dst)
Compress a buffer of bytes using LZMA.
bool serializeMessageToStdout(const ::google::protobuf::Message &msg, bool compress=true)
Serialize a Google Protocol Buffer to stdout in the following format:
void decompressLZMA(const std::string &src, std::string &dst)
Decompress a buffer of bytes using LZMA.