unr

unrar

Unrar for node.js

Showing:

Popularity

Downloads/wk

364

GitHub Stars

12

Maintenance

Last Commit

2yrs ago

Contributors

8

Package

Dependencies

0

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

unrar

Unrars rar archives with unrar utility

Installation

npm install unrar

You must have unrar tool in the path. For windows download from http://www.rarlab.com/rar_add.htm

Example

var Unrar = require('unrar');

var archive = new Unrar('archive.rar');
// or
// var archive = new Unrar({
//   path:      protectedArchivePath,
//   arguments: ['-pPassword'],
//   bin: pathToUnrarBin // Default: unrar
// });

archive.list(function (err, entries) {
  var stream = archive.stream('some_binary_entry'); // name of entry
  stream.on('error', console.error);
  stream.pipe(require('fs').createWriteStream('some-binary-file'));
});

Usage

var Unrar = require('unrar');

API

Constructor

var archive = new Unrar('/path/to/some/file.rar');
  • options String|Object File path or options object
    • path String File path
    • arguments Array Additional arguments for unrar command

archive.list(callback)

  • callback Function
    • error Error
    • entries Array Descriptions of archive entries

archive.stream(entryName)

  • entryName String Name of entry for extracting

Returns readable stream

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial