How can I decompress a vector of deflated data with Boost?

后端 未结 1 1971
南笙
南笙 2021-01-21 04:36

I have a vector that contains zlib-compressed (deflated) data. I would like to decompress it with Boost\'s filtering_istream. There is only one example on their sit

相关标签:
1条回答
  • 2021-01-21 04:42

    How about an array_source?

    in.push(array_source(&*compressed_data.begin(), &*compressed_data.end()));
    

    Then use boost::iostreams::copy with a std::insert_iterator to push the result characters into a new vector.

    0 讨论(0)
提交回复
热议问题