pieroxy / lz-string

LZ-based compression algorithm for JavaScript
MIT License
4.08k stars 567 forks source link

CLI support for decompressing base64 encoded files #262

Open IGx89 opened 4 months ago

IGx89 commented 4 months ago

Hello! I was playing around with the new CLI options in v2 (thanks!) and ran into a limitation. For decompressing it always assumes the input file is a binary uint8array file. It doesn't support decoding files in other formats, such as base64 text files. Could support for that be added? It took me a while to figure out why lz-string -d -e base64 lzstring_in.txt always output nothing.

Rycochet commented 4 months ago

Meh, I have so many problems with that - but it's valid - it must load as a unit8array purely to keep the binary data (thanks nodejs), but I should do some validation checking on things and make sure it's behaving correctly - currently no time for it, so not sure when I'll get a chance - just want to confirm tht when you use the decoder directly with a javascript string it outputs the right data? 😄