All Projects → onikienko → 7zip-min

onikienko / 7zip-min

Licence: MIT License
Minimal standalone cross-platform pack/unpack with 7-zip for Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to 7zip-min

SevenZipSharp
Fork of SevenZipSharp on CodePlex
Stars: ✭ 171 (+755%)
Mutual labels:  7zip
lrkFM
Awesome, (ad) free, open source file manager for Android
Stars: ✭ 44 (+120%)
Mutual labels:  7zip
Archive7z
This library provides handling of 7z files in PHP
Stars: ✭ 73 (+265%)
Mutual labels:  7zip
go7z
A native Go 7z archive reader.
Stars: ✭ 46 (+130%)
Mutual labels:  7zip
QArchive
Async C++ Cross-Platform library that modernizes libarchive using Qt5 🚀. Simply extracts 7z 🍔, Tarballs 🎱 and other supported formats by libarchive. ❤️
Stars: ✭ 66 (+230%)
Mutual labels:  7zip
ZeeArchiver
Zee is an efficient and simple to use Android Archiver and decompressor. It can decompress and compress from-to all the formats supported by the well known 7zip utility. Copyright © 2018 Mahmoud Galal , for support contact me:[email protected]
Stars: ✭ 35 (+75%)
Mutual labels:  7zip
MangDL
The most inefficient Manga downloader for PC
Stars: ✭ 40 (+100%)
Mutual labels:  7zip
7 Zip Zstd
7-Zip with support for Brotli, Fast-LZMA2, Lizard, LZ4, LZ5 and Zstandard
Stars: ✭ 2,150 (+10650%)
Mutual labels:  7zip
Libarchive
Multi-format archive and compression library
Stars: ✭ 1,625 (+8025%)
Mutual labels:  7zip
PLzmaSDK
PLzmaSDK is (Portable, Patched, Package, cross-P-latform) Lzma SDK.
Stars: ✭ 28 (+40%)
Mutual labels:  7zip
docker-7zip
7-Zip Docker image based on Alpine Linux
Stars: ✭ 16 (-20%)
Mutual labels:  7zip

7zip-min

Minimal cross-platform pack/unpack (and any command) with 7-zip for Node.js.
It does not require 7zip to be installed in your system. This package includes standalone 7za version of 7-Zip (uses precompiled binaries from 7zip-bin package).

Supporting archive formats

According to Command Line Version User's Guide page, 7za supports only 7z, lzma, cab, zip, gzip, bzip2, Z and tar formats.

Supporting platforms

  • win (32/64)
  • mac
  • linux
    • arm
    • arm64
    • ia32
    • x64

To get more details check 7zip-bin package repo.

Usage

You may use pack and unpack methods for simple packing/unpacking.

You can also use list to get an array with the file content properties (includes date, time, attr, size, compressed and name)

Or use cmd to run 7za with custom parameters (see Command Line Version User's Guide)

const _7z = require('7zip-min');

// unpack
_7z.unpack('path/to/archive.7z', 'where/to/unpack', err => {
    // done
});

// unpack into the current directory (process.cwd()) if no output directory specified
_7z.unpack('path/to/archive.7z', err => {
    // done
});

// pack
_7z.pack('path/to/dir/or/file', 'path/to/archive.7z', err => {
    // done
});

// list
_7z.list('path/to/archive.7z', (err, result) => {
    // in result you will have an array with info list for your archive
    // for each element in archive you will have:
    // name, date, time, attr, size (in bytes), compressed (compressed size in bytes), crc, method, encrtypted, block
    // depeneds on archive type some values may be empty or missed
});

// cmd
// in the first parameter you have to provide array of parameters
// check 7z's Command Line Version User's Guide - https://sevenzip.osdn.jp/chm/cmdline/index.htm
// the bellow command is equal to `7za a path/to/archive.7z path/to/dir/or/file` and will add `path/to/dir/or/file` to `path/to/archive.7z` archive
_7z.cmd(['a', 'path/to/archive.7z', 'path/to/dir/or/file'], err => {
    // done
});

Test

npm test

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].