-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
"C++ lib for gzip compression and decompression" means not for zip packages?
I have tried:
std::string filename("c:/transfer/test.zip");
std::ifstream ifs(filename, std::ios_base::in | std::ios_base::binary);
if (ifs.is_open())
{
std::cout << "zip opened\n";
std::string str_compressed((std::istreambuf_iterator<char>(ifs.rdbuf())), std::istreambuf_iterator<char>());
ifs.close();
std::string out{};
gzip::Decompressor decomp{};
try
{
decomp.decompress(out, str_compressed.data(), str_compressed.size());
std::cout << out.c_str() << std::endl;
}
catch (std::exception& ex)
{
std::cout << ex.what() << std::endl;
}
}
But I got:
incorrect header check
So, gzip isn't for zip packages?
Metadata
Metadata
Assignees
Labels
No labels