Git Product home page Git Product logo

unrar.js's People

Contributors

boggan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

unrar.js's Issues

unrar stream

Hi, how I can use streams? My file size 50gb and I haven't a lot of RAM

FUCK YOU!

Windows user here and apologizes for my offensive word usage.

Already overwhelmed by the libraries out there, it's damn hard to get a single one worked. The closest working one I came across is that Chinese made Library (Shit can't write files, only read list - good one anyway) and the rest including yours are not working.

I love your library as it implemented in pure JS rather a wrapper around unrar binary

However, my heart got broken when I ran my first code using your lib. The thing output following,

unpackedFiles.forEach(function(file){
              ^
TypeError: Cannot read property 'forEach' of undefined

My code is similar to your sync example!

Extract files with sync usage

As async usage gives me an error on extract (issue #2), i want to try to extract using sync method.
the problem is i can not save extracted files on disk, and set output directory.
I tried to save file.data using streamWriter for each unpacked files. but could not make it work.
is it possible to automate extraction by setting output path like you do in async method?

asynchronous usage error

Trying to async extract a rar file, after finishing the process, this error shows and some of extracted files are broken.

Uncaught Error: kill ENOSYS
at exports._errnoException (util.js:1022)
at ChildProcess.kill (internal/child_process.js:389)
at ChildProcess.childProcess.on (E:\Projects\Electron\electron-starter\node_modules\unrar-js\unrar.js:153)
at emitTwo (events.js:106)
at ChildProcess.emit (events.js:191)
at process.nextTick (internal/child_process.js:752)
at _combinedTickCallback (internal/process/next_tick.js:67)
at process._tickCallback (internal/process/next_tick.js:98)
exports._errnoException @ util.js:1022
ChildProcess.kill @ internal/child_process.js:389
childProcess.on @ E:\Projects\Electron\electron-starter\node_modules\unrar-js\unrar.js:153
emitTwo @ events.js:106
emit @ events.js:191
process.nextTick @ internal/child_process.js:752
_combinedTickCallback @ internal/process/next_tick.js:67
_tickCallback @ internal/process/next_tick.js:98

it seems that it cannot work. is there problem in my code?

`const unrar = require('unrar.js');
const fs = require('fs');

let unpackedFiles;

let rarFile = '/media/creatxr/DATAL/xxx.rar';

unpackedFiles = unrar.unrarSync(rarFile, {
onProgress: function(data) {
console.log(data);
let l_nPercent = Math.round((data.currentBytesUnarchived / data.totalUncompressedBytesInArchive) * 100);
console.log("Progress: ", l_nPercent, "%");
}
});

unpackedFiles.forEach(function(file){
console.log(file.filename, file.fileData.length);
});`

console message:

{ currentFilename: '',
currentFileNumber: 0,
currentBytesUnarchivedInFile: 0,
currentBytesUnarchived: 0,
totalUncompressedBytesInArchive: 0,
totalFilesInArchive: 0 }
Progress: NaN %

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.