# all-unpacker

> All unpacker for zip, zipx, rar, 7z, tar, gzip, bzip2, lzma,... See theunarchiver.com for complete list, wrapper for unar and lsar.

Latest version **0.1.14** (published 2020-12-22) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install all-unpacker
pnpm add all-unpacker
yarn add all-unpacker
bun add all-unpacker
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.14 |
| Published | 2020-12-22 |
| First published | 2018-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 19.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 1 |
| Author | Marc Kronberg |
| Maintainers | technoexpress |
| Keywords | Unarchiver, Unpacker, Zip, Zipx, RAR, 7z, Tar, Gzip, Bzip2, LZMA, XZ, Mac OS X, Windows, Linux, Apple |

## Links

- npm: https://www.npmjs.com/package/all-unpacker
- Repository: https://github.com/techno-express/node-unpack-all
- Homepage: https://github.com/techno-express/node-unpack-all.git
- Issues: https://github.com/techno-express/node-unpack-all/issues
- npm.io page: https://npm.io/package/all-unpacker

## Dependencies (4)

- [fs-extra](https://npm.io/package/fs-extra.md) ^9.0.1
- [node-stream-zip](https://npm.io/package/node-stream-zip.md) ^1.12.0
- [node-wget-fetch](https://npm.io/package/node-wget-fetch.md) ^1.0.5
- [system-installer](https://npm.io/package/system-installer.md) ^1.1.5

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 0.1.14 (latest) — 2020-12-22
- 0.1.13 — 2020-12-04
- 0.1.12 — 2020-11-10
- 0.1.11 — 2020-11-10
- 0.1.10 — 2020-11-08
- 0.1.9 — 2020-11-07
- 0.1.8 — 2020-11-07
- 0.1.7 — 2020-11-06
- 0.1.6 — 2020-11-02
- 0.1.5 — 2020-10-25
- 0.1.3 — 2019-07-13
- 0.1.2 — 2018-08-30
- 0.1.1 — 2018-08-29
- 0.1.0 — 2018-08-28
- 0.0.9 — 2018-02-19
- … 4 more at https://npm.io/package/all-unpacker/versions

## README

all-unpacker
=======

[![NPM](https://nodei.co/npm/all-unpacker.png)](https://nodei.co/npm/all-unpacker/)

[![Dependencies Status][david-image]][david-url] [![Node.js CI](https://github.com/techno-express/node-unpack-all/workflows/Node.js%20CI/badge.svg)](https://github.com/techno-express/node-unpack-all/actions) [![codecov](https://codecov.io/gh/techno-express/node-unpack-all/branch/master/graph/badge.svg?token=d9L7TvbndH)](https://codecov.io/gh/techno-express/node-unpack-all) [![Maintainability][codeclimate-image]][codeclimate-url][![Release][npm-image]][npm-url]

> Wrapper for [unar and lsar](http://unarchiver.c3.cx/commandline) command line tool.
It allows you to unpack a lot of formats: zip, zipx, rar, 7z, tar, gzip, bzip2, lzma, cab, msi, cpio,... [complete list](http://unarchiver.c3.cx/formats)

## Installation

This package has been replaced with [node-unar](https://github.com/techno-express/node-unar).

## Usage

```js
var ua = require('all-unpacker');
// list only:
ua.list(archiveFile<String>, options<Object>, callback<function>)
// unpack:
ua.unpack(archiveFile<String>, options<Object>, callback<function>)
```

### Examples

#### Example: unpack file

```js
require('all-unpacker')
.unpack('test/abc.rar', {
    targetDir: 'out'
}, function(err, files, text) {
   if (err) return console.error(err);
   if (files) console.log('files', files);
   if (text) console.log('text', text);
});
```

#### Example: list content

```js
function cb(err, files, text) {
    if (err) return console.error(err);
    console.log('files', files);
}
require('all-unpacker').list('test/abc.rar', {}, cb);
```

### Options

Key       | Possible values        | Comment
--------- | -----------------------|-------------------------------------------------
quiet     | true/false (default)   | true will reduce logging for unpacking
targetDir | \<String>              | The directory to write the contents of the archive to. Defaults to the current directory.
files     | \<String>              | Only unpack this list of files or directories.
forceOverwrite | true/false (default)  | if null, tmp dir will created automatically
forceDirectory | true/false/undefined  | Always create a containing directory for the contents of the unpacked archive. By default, a directory is created if there is more than one top-level file or folder.
noDirectory | true/false/undefined     | Never create a containing directory for the contents of the unpacked archive.
noRecursion | true/false/undefined     | Do not attempt to extract archives contained in other archives. For instance, when unpacking a .tar.gz file, only unpack the .gz file and not its contents.
copyTime | true/false/undefined        | Copy the file modification time from the archive file to the containing directory, if one is created.
password | \<String>                   | The password to use for decrypting protected archives.
passwordEncoding | \<String>           | The encoding to use for the password for the archive, when it is not known. If not specified, then either the encoding given by the -encoding option or the auto-detected encoding is used.
encoding | \<String>                   | The encoding to use for filenames in the archive, when it is not known. If not specified, the program attempts to auto-detect the encoding used. Use "help" or "list" as the argument to give

[david-url]: https://david-dm.org/techno-express/node-unpack-all
[david-image]: http://img.shields.io/david/techno-express/node-unpack-all.svg
[codeclimate-url]: https://codeclimate.com/github/techno-express/node-unpack-all/maintainability
[codeclimate-image]: https://api.codeclimate.com/v1/badges/0d6a0bc69a8ea29c7de9/maintainability
[npm-url]: https://www.npmjs.org/package/all-unpacker
[npm-image]: http://img.shields.io/npm/v/all-unpacker.svg

---
_Source: https://npm.io/package/all-unpacker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
