u1f98e / micropak Goto Github PK
View Code? Open in Web Editor NEWA basic file archiving library
License: MIT License
A basic file archiving library
License: MIT License
Micropak, a basic library for archiving files Written by hippo_o_matic Dependencies: - meson - zlib (optionally) - cmake (optionally) Building: mkdir build meson build ninja -C build To use include micropak.hpp in your source and link libmicropak.so (-lmicropak in g++) All commands are stored under the "micropak" namespace, these include: micropak::pack(std::string input_directory, std::string output_file, bool compress, std::vector<meta_entry>); Packs the <input_directory> into an <output_file>, by default the directory's name. Also takes a vector of meta entries, which are pairs of values you can store right in the archive. Example of a meta entry: {name, value} | {"Author", "hippo"} micropak::unpack(std::string input_file, std::string output_dir); Unpacks the <input_file> to <output_dir>, by default the working directory. Returns a vector of meta_entries found micropak::getVersion(std::string filename); | micropak::getVersion(std::fstream &stream); Gets the version of the library the archive was packed with This library includes support for compressing and decompressing archives on the fly using gzip-hpp (https://github.com/mapbox/gzip-hpp) made by mapbox. You can toggle the use of gzip-hpp by setting the option 'use_gzip' either in meson_options.txt or by configuring the project like so: meson configure -Doption=newvalue This repo also comes with a minimalist example program, demo.cpp. Program usage: ./archiver <options> -p <directory> | Recursively packs all files in <directory> to -o <file>. Uses <directory>.mpak if -o <file> not given -u <file> | Unpacks an archive, <file>, using -o <directory> as it's root. Uses <file> as the name if -o <directory> not given -o <file/directory> | Outputs the result of -p or -u to <file/directory> -m <name=content,name=content> | Attaches given meta tag pairs, the name and content of each tag seperated by '=', and each pair seperated by ',' -v | Enables verbose mode, reports back what is being done for debugging purposes --no-gzip | Packs a file without gzipping it -h, --help | Displays this message :)"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.