Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deadpikle/libzip-plus-plus
A libzip C++ wrapper originally built by markand
https://github.com/deadpikle/libzip-plus-plus
cplusplus cpp libzip libzip-wrappers zip
Last synced: 22 days ago
JSON representation
A libzip C++ wrapper originally built by markand
- Host: GitHub
- URL: https://github.com/deadpikle/libzip-plus-plus
- Owner: Deadpikle
- License: other
- Created: 2018-05-22T14:25:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-11T15:58:54.000Z (over 4 years ago)
- Last Synced: 2024-10-25T05:58:45.191Z (2 months ago)
- Topics: cplusplus, cpp, libzip, libzip-wrappers, zip
- Language: C++
- Homepage: http://hg.markand.fr/libzip/
- Size: 247 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
libzip++ -- A safe modern C++ 17 wrapper around libzip
===================================================Info about this repo
--------------------
This repo was originally found [here](https://bitbucket.org/markand/libzip/) (404), but @markand ([BitBucket](https://bitbucket.org/markand/), [GitHub](https://github.com/markand), [Website](http://markand.fr/), [Mercurial Server](http://hg.markand.fr)) has since taken the repo down for unknown reasons. The library had a permissive license, so I have re-uploaded/mirrored the library here for historical purposes.In August 2020, the original library was found in a more updated version on the original author's Mercurial server [here](http://hg.markand.fr/libzip/summary). I updated the code in this repo accordingly!
Introduction
------------The libzip library is a good C library for opening and creating zip archives,
this wrapper provides safe C++ classes around this great library.The benefits:
- Automatic allocations and destructions (RAII),
- Easy way to add files,
- Easy API,
- Easy file reading in archive,
- Read only iterator interface,
- Convenience, thanks to C++ function overloads.Documentation (copied from `mainpage.cpp`)
-------------### Installation
Just copy the file zippy.hpp and add it to your project.
### Overview
A simple example of the extraction of a file.
```cpp
#include#include "zip.hpp"
int main()
{
try {
libzip::archive archive("mydata.zip");
libzip::stat_info stat = archive.stat("README");
libzip::file file = archive.open("README");std::cout << "content of README:" << std::endl;
std::cout << file.read(stat.size);
} catch (const std::exception &ex) {
std::cerr << ex.what() << std::endl;
}
}
```Other libzip wrappers
---------------------* [libzippp](https://github.com/ctabin/libzippp)