Skip to content
/ miniz-cpp Public

A library for reading and writing zip files or streams, based on miniz

License

Notifications You must be signed in to change notification settings

kkzi/miniz-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miniz-cpp

fork from miniz-cpp

and rename file from zip_file.hpp to miniz_cpp.hpp

update miniz to v2.2.0 from miniz



Read from zip file
#include <miniz_cpp.hpp>
int main()
{
    miniz_cpp::zip_file file("test.zip");
    file.printdir();

    return 0;
}

Write to zip file
#include <miniz_cpp.hpp>
int main()
{
    miniz_cpp::zip_file file;
    file.writestr("file1.txt", "this is file 1");
    file.writestr("file2.txt", "this is file 2");
    file.writestr("file3.txt", "this is file 3");
    file.writestr("file4.txt", "this is file 4");
    file.writestr("file5.txt", "this is file 5");
    file.save("test.zip");
    
    return 0;
}

Streams
#include <miniz_cpp.hpp>
int main()
{
    std::ifstream stm("test.zip");
    miniz_cpp::zip_file file;
    file.load(ss);
    file.printdir();
    
    return 0;
}

About

A library for reading and writing zip files or streams, based on miniz

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages