cscott / compressjs

Pure JavaScript de/compression (bzip2, etc) for node.js, volo, and the browser.
GNU General Public License v2.0
352 stars 41 forks source link

Bzip2: Possible oversight? #8

Open jspark311 opened 8 years ago

jspark311 commented 8 years ago

Hi there,

I'm not sure if it was an oversight or not, but the documentation is misleading. I cannot use Bzip2 to compress anything but a stream. I forked your repo and did the needful. Should I submit a PR, or was the omission intentional?

cscott commented 6 years ago

PRs are always helpful, if nothing else than to clarify what you're talking about.

dkg commented 6 years ago

take a look at #20 please, i think it might address this concern. @jspark311, can you verify?

jspark311 commented 6 years ago

No. My issue was an API asymmetry. https://github.com/cscott/compressjs/blob/master/lib/Bzip2.js#L879

I made local changes to the package, but never submitted them. Since cryptjs was not operable at the time, browser-based compression was not on my priority list.

I followed the thread "compressjs dependency #695", but my issue wasn't related to what those guys are talking about, and your change doesn't address the gap this issue is related to.

I needed "compressBlock" as well as "decompressBlock".