0

This is a followup to the question

using php-gzdeflate and pako-js

One of the answers indicated that the lines of code . . const compress = str => Buffer.from(pako.deflateRaw(str)).toString('base64'); console.log(compress('asdfasdfasdfasdf')); //SyxOSUtEwgA= . .

might work, provided the "Buffer" could be implemented. The author of the answer didn't say exactly how to generate the Buffer for the Browser/Javascript.

I managed to generate a javascript file "safe-buffer.js" based on the safe-buffer nodejs module, but I have no idea as to how to actually invoke/init the "Buffer" object to be able to test with it.

If someone has information or insight into how this works within the Browser/Javascript, this would help a number of people trying to solve this issue.

thanks

tom smith
  • 1,035
  • 7
  • 23
  • 39

0 Answers0