regular / unbzip2-stream

streaming unbzip2 implementatio in pure javascript for node and browsers
Other
29 stars 23 forks source link

TypeError unpacking on Windows #4

Closed miffels closed 7 years ago

miffels commented 8 years ago

Hi,

I am getting the following error when I try unpacking this Git release on my machine:

C:\[...]\node_modules\unbzip2-stream\index.js:62
                throw e;
                      ^
TypeError: object is not a function
    at Object.bzip2.header (C:\SAP_HAT_local-1.10.2\setup\node_modules\unbzip2-stream\lib\bzip2.js:152:9)
    at decompressBlock (C:\SAP_HAT_local-1.10.2\setup\node_modules\unbzip2-stream\index.js:17:29)
    at decompressAndQueue (C:\SAP_HAT_local-1.10.2\setup\node_modules\unbzip2-stream\index.js:46:20)
    at Stream.end (C:\SAP_HAT_local-1.10.2\setup\node_modules\unbzip2-stream\index.js:86:23)
    at _end (C:\SAP_HAT_local-1.10.2\setup\node_modules\unbzip2-stream\node_modules\through\index.js:65:9)
    at Stream.stream.end (C:\SAP_HAT_local-1.10.2\setup\node_modules\unbzip2-stream\node_modules\through\index.js:74:5)
    at ReadStream.onend (_stream_readable.js:505:10)
    at ReadStream.g (events.js:199:16)
    at ReadStream.emit (events.js:129:20)
    at _stream_readable.js:908:16

The code snipped I am using is as follows:

    fs.createReadStream('path/to/downloaded/file.tar.bz2')
        .pipe(bz2())
        .pipe(process.stdout);

Just to make sure, the SHA-1 checksum of the file downloaded by my program is 9355858E262C461E1544A7BF13A457203C4D5457, and WinRar can open it just fine.

Best, Michael

regular commented 8 years ago

Are you still having this problem or did version 1.0.10 fix it for you?

regular commented 7 years ago

Since there's been silence for half a year, I just assume it is fixed. Correct me if I'm wrong.