I'm trying to decompress files provided by rust's documentation service. For whatever reason they decided to compress these in BZIP2. I've decided to try passing { decompress: false, decrypt: null, start: null, end: null } to openReadStream() to prevent yauzl from attempting to decompress the entry and instead pass the Readable stream to unbzip2-stream. Unfortunately since yauzl thinks the entry is not compressed this causes an error: options.decompress can only be specified for compressed entries.
Therefore I cannot get the non decompressed contents of the entry to handle myself. This leaves me in the unfortunate position that yauzl cannot decompress the entry and also cannot not attempt to decompress the entry.
Is the best option to return isCompressed() = true for any entry with a compressionMethod greater than 0?
I'm trying to decompress files provided by rust's documentation service. For whatever reason they decided to compress these in BZIP2. I've decided to try passing
{ decompress: false, decrypt: null, start: null, end: null }toopenReadStream()to prevent yauzl from attempting to decompress the entry and instead pass the Readable stream tounbzip2-stream. Unfortunately since yauzl thinks the entry is not compressed this causes an error:options.decompress can only be specified for compressed entries.Therefore I cannot get the non decompressed contents of the entry to handle myself. This leaves me in the unfortunate position that yauzl cannot decompress the entry and also cannot not attempt to decompress the entry.
Is the best option to return
isCompressed() = truefor any entry with a compressionMethod greater than 0?