Trying to inflate a deflated string aHash
.
The following returns non-ascii characters:
(gAppsScript:)
var decodedA = Utilities.base64Decode(aHash,Utilities.Charset.US_ASCII);
var decodedU = Utilities.base64Decode(aHash,Utilities.Charset.US_UTF_8);
Logger.log(Utilities.newBlob(decodedA).getDataAsString());
Logger.log(Utilities.newBlob(decodedU).getDataAsString());
(php:)
$uncompressed = gzinflate($yourFile);
echo $uncompressed;
This page can do it http://www.alderg.com/convert.html but is there a known built in alternative in js/gAppscript/php?
[Update]
This is cross posted in a different SE section and thanks to David for his answer. Following up, base64Decode is different from deflate decode. Is there a way to deflate a string in G-Appscript, perhaps with the UrlFetchApp?
Apps Script HTML Service can use jQuery and jQuery can inflate and deflate text. But this may not help you, depending on how you are using Apps Script. Are you using Apps Script in a Spreadsheet, a Doc, or something else? I'm not sure how you or your users are interacting with your code.
I found this jsFiddle on inflating and deflating with jQuery:
Link to jsFiddle Inflate/Deflate
Also, I'm guessing that you want the Apps Script to go out and get something that was deflated by some other source? Another website? Originally deflated in some other language?