Boost IO Stream and ZLib speed up
问题 I have a large file of data I have compressed with Zlib using boost IOStreams and filtering stream buffers: boost::iostreams::array_source uncompressedArray( reinterpret_cast< const char* >( &uncompressedData[0] ), uncompressedData.size() ); boost::iostreams::filtering_streambuf< boost::iostreams::output > out; out.push( *m_compressor ); out.push( boost::iostreams::char_back_inserter( compressedData ) ); boost::iostreams::copy( uncompressedArray, out ); For speed I am initializing the zlib