Giter Site home page Giter Site logo

11zip's Introduction

11Zip

build

11Zip (or ELevenZip) is a dead simple zipping / unzipping C++ Lib

I didn't really wanted to make my own zipping / unzipping library but as I found nothing else, I made my own.

That's why I called this lib 11Zip, 11 is the atomic number of the sodium as it describes pretty well my salty feeling when searching for a zipping / unzipping C++ Lib.

By the same time it's also a reference to 7zip.

The lib is based on zlib & minizip : https://github.com/madler/zlib

It does also include some wrapper code from here : www.vilipetek.com/2013/11/22/zippingunzipping-files-in-c/

Installation

Clone this repository using the following command :

git clone --recurse-submodules https://github.com/Sygmei/11Zip.git

(don't forget about the --recurse-submodules part or dependencies are not going to be downloaded).

Once downloaded, put the content into your extlibs/ (or equivalent) directory and put the following lines in your CMakeLists.txt :

add_subdirectory(extlibs/elzip) # Path to the 11zip

target_link_libraries(YourTargetName elzip)

Reference

elz::extractZip

void elz::extractZip(std::string zipname, std::string target = ".", std::string password = "");

Unzips the content of a zip in "target" folder (which is current folder by default).

  • zipname : Path to the .zip archive to unzip
  • target : Path to the directory where you want to unzip the archive, defaults to the current working directory
  • password : Archive password (optional)

elz::extractFile

void elz::extractFile(std::string zipname, std::string filename, std::string target = ".", std::string password = "");

Extracts a single file from a zip archive

  • zipname : Path to the .zip archive to unzip the file from
  • filename : Path of the file to extract within the zip archive, note that this name will be used by the unzipped file as well
  • target : Path where to extract the file to, defaults to the current working directory
  • password : Archive password (optional)

elz::zipFolder

void elz::zipFolder(std::string folderName, std::string zipTarget = "");

Zips the folder "folderName" to "zipTarget" (Which is "folderName".zip by default).

  • folderName : Name of the folder to zip (will zip all of its content, root folder excluded)
  • zipTarget : Path to .zip archive that will be created, defaults to folderName.zip

11zip's People

Contributors

artemis-beta avatar assertores avatar blawrence-ont avatar iiseymour avatar markbicknellont avatar matjojo avatar sygmei avatar tim-gromeyer avatar xavierberger avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.