Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
zlib.cpp
Go to the documentation of this file.
2
3#include <boost/iostreams/filtering_stream.hpp>
4#include <boost/iostreams/device/back_inserter.hpp>
5#include <boost/iostreams/filter/zlib.hpp>
6
7namespace bio = boost::iostreams;
8
9namespace fc
10{
11 string zlib_compress(const string& in)
12 {
13 string out;
14 bio::filtering_ostream comp;
15 comp.push(bio::zlib_compressor(bio::zlib::default_compression));
16 comp.push(bio::back_inserter(out));
17 bio::write(comp, in.data(), in.size());
18 bio::close(comp);
19 return out;
20 }
21}
namespace sysio::chain
Definition authority.cpp:3
string zlib_compress(const string &in)
Definition zlib.cpp:11