Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
zlib.cpp
Go to the documentation of this file.
1
#include <
fc/compress/zlib.hpp
>
2
3
#include <boost/iostreams/filtering_stream.hpp>
4
#include <boost/iostreams/device/back_inserter.hpp>
5
#include <boost/iostreams/filter/zlib.hpp>
6
7
namespace
bio = boost::iostreams;
8
9
namespace
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
}
fc
namespace sysio::chain
Definition
authority.cpp:3
fc::zlib_compress
string zlib_compress(const string &in)
Definition
zlib.cpp:11
zlib.hpp
libraries
fc
src
compress
zlib.cpp
Generated by
1.12.0