Boost logo

Boost Users :

From: asfskfdjkj kfasjfkasjf (kenatuk123_at_[hidden])
Date: 2021-03-30 13:14:33


Hi guys    I tried to unzip a file with code below which exactly like the example from boost.org, but it doesn't work 
the example is in the link which is Zlib Filters

|
|
| |
Zlib Filters

 |

 |

 |

I tried the code like the below
try{     ifstream file("d:\\202012303333629003180526491.txt.zip", ios_base::in | ios_base::binary);     boost::iostreams::filtering_streambuf<boost::iostreams::input> in;     in.push(boost::iostreams::zlib_decompressor());     in.push(file);      boost::iostreams::copy(in, cout);      return 0;}catch (const std::exception& error) {
      std::cerr << error.what() << std::endl;
      return (EXIT_FAILURE);
   }
it's not working, it get exception when it excuted boost::iostreams::copy(in, cout); I got the  zlib error: iostream stream error exception thoughwhat wrong I have done though? thank you



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net