First time posting on here, so sorry if I'm missing anything. I'm trying to decode this base64 string in Node.js like so:
encoded_string = H4sIAAAAAAAA//NIzcnJVwjPL8pJUQQAoxwpHAwAAAA=
decoded_string = Buffer.from(encoded_string, 'base64').toString('binary')
My goal is for decoded_string to evaluate to "Hello world!", but I need to use the gzip algorithm to output the correct value. Any pointers?
Use this function to decode the binary.
Usage Example:
zlib.gunzipSync(Buffer.from(encoded_string, 'base64')).toString('utf8');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With