rotemdan / lzutf8.js

A high-performance Javascript string compression library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docs are wrong "StorageBinaryString" should be "BinaryString"

benzmuircroft opened this issue · comments

The npm page shows compress opts outputEncoding has option for StorageBinaryString but a look at the source code shows that you have renamed the value to "BinaryString"

If I follow the docs I get error: lzutf8.js:529 Uncaught TypeError: encodeCompressedBytes: invalid output encoding requested at Object.CompressionCommon.encodeCompressedBytes (lzutf8.js:529) at Object.compress (lzutf8.js:1514) at <anonymous>:1:21

(I'm using the demo page with console open and I'm only using the console to test commands)

the code I used ctrl+f is: https://rotemdan.github.io/lzutf8/build/production/lzutf8.js
I searched for " invalid output encoding requested"

Screenshot from 2020-09-28 21-30-49

Sorry for an extremely late response! This code was written so long ago I had to refresh my memory.

The demo page is not up to date with latest version: The version of the library it uses hasn't been updated since 2017. (Seems like it uses version 0.4.0. Latest is 0.5.7.)

I am releasing an update now. I'll try to update the demo as well. Thanks for reporting.