HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/zaklada/html/node_modules/decompress/readme.md
# decompress [![Build Status](https://travis-ci.org/kevva/decompress.svg?branch=master)](https://travis-ci.org/kevva/decompress)

> Extracting archives made easy

*See [decompress-cli](https://github.com/kevva/decompress-cli) for the command-line version.*

## Install

```
$ npm install --save decompress
```


## Usage

```js
const Decompress = require('decompress');

new Decompress({mode: '755'})
	.src('foo.zip')
	.dest('dest')
	.use(Decompress.zip({strip: 1}))
	.run();
```


## API

### new Decompress(options)

Creates a new `Decompress` instance.

#### options.mode

Type: `string`

Set mode on the extracted files, i.e `{ mode: '755' }`.

#### options.strip

Type: `number`

Equivalent to `--strip-components` for tar.

### .src(files)

#### files

Type: `array`, `buffer` or `string`

Set the files to be extracted.

### .dest(path)

#### path

Type: `string`

Set the destination to where your file will be extracted to.

### .use(plugin)

#### plugin

Type: `function`

Add a `plugin` to the middleware stack.

### .run(callback)

Extract your file with the given settings.

#### callback(err, files)

Type: `function`

The callback will return an array of vinyl files in `files`.


## Plugins

The following [plugins](https://www.npmjs.org/browse/keyword/decompressplugin) are bundled with decompress:

* [tar](#tar) — Extract TAR files.
* [tar.bz2](#tarbz2) — Extract TAR.BZ files.
* [tar.gz](#targz) — Extract TAR.GZ files.
* [zip](#zip) — Extract ZIP files.

### .tar(options)

Extract TAR files.

```js
const Decompress = require('decompress');

new Decompress()
	.use(Decompress.tar({strip: 1}));
```

### .tarbz2(options)

Extract TAR.BZ files.

```js
const Decompress = require('decompress');

new Decompress()
	.use(Decompress.tarbz2({strip: 1}));
```

### .targz(options)

Extract TAR.GZ files.

```js
const Decompress = require('decompress');

new Decompress()
	.use(Decompress.targz({strip: 1}));
```

### .zip(options)

Extract ZIP files.

```js
const Decompress = require('decompress');

new Decompress()
	.use(Decompress.zip({strip: 1}));
```


## License

MIT © [Kevin Mårtensson](https://github.com/kevva)