I am working on a program that reads headers from curl, executes and searches for a specific header, and if it is found, destroy some of the content and find another line in the content. I need to implement the last part. rest is done. Is there a way to unzip the contents from a C ++ program and save the result to another line and search for that line?
code snippets will be good. thank.
Use Boost Iostreams . If bufis a string containing gzip'd data,
buf
namespace io = boost::iostreams; io::filtering_istream gunzip; gunzip.push(io::gzip_decompressor()); gunzip.push(std::istringstream(buf));
then read from gunzip.
gunzip
gunzip , execv() gunzip stdout ( ). , , , --.