Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Not for zip packages? #45

Description

@flaviu22

"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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions