Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returns an 'invalid distance code' error. #65

Open
lysdexia opened this issue Oct 10, 2014 · 0 comments
Open

Returns an 'invalid distance code' error. #65

lysdexia opened this issue Oct 10, 2014 · 0 comments

Comments

@lysdexia
Copy link

Archive contains a number of text files. Archive works fine using unzip on unix.

{ [Error: invalid distance code] errno: -3, code: 'Z_DATA_ERROR' }

var fs = require('fs');
var unzip = require('unzip');

var path = 'archive.zip';
var incoming = fs.createReadStream(path).pipe(unzip.Parse());

incoming.on('error', function errorCB (error) {
    if (error) {
        callback(error);
        return;
    }
});

incoming.on('entry', function entryCB (entry) {
    if (self._isArchive(entry.path) === false) {
        entry.autodrain();
    } else {
        console.log(entry.path);
    }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant