I'm trying to mock Redis lua scripting behavior, and one of the challenges there is that Redis is "binary safe"
meaning u can operate with binary data (e.g images), which is stored the same was as regular strings.
As an input to lua I can get any binary(e.g utf-8 bytes, binary data)
In case of redis utf-8 passed to lua as bytes, in lua u can compare these bytes with strings
also it can return valid binary data from lua strings, in my example above, the compare will not work, but binry data will be returned properly from lua
in the other hand, If I will inject to lua the utf8 string as hex representation (with leading \x), it will successfully compare the string, but will not return valid binary data from lua script
So in general my question is, how do I pass binary data to lua?
and return binary data from there
Not sure this is wasmoon issue, but I will appreciate any help :)
I'm trying to mock Redis lua scripting behavior, and one of the challenges there is that Redis is "binary safe" meaning u can operate with binary data (e.g images), which is stored the same was as regular strings.
As an input to lua I can get any binary(e.g utf-8 bytes, binary data)
In case of redis utf-8 passed to lua as bytes, in lua u can compare these bytes with strings also it can return valid binary data from lua strings, in my example above, the compare will not work, but binry data will be returned properly from lua
in the other hand, If I will inject to lua the utf8 string as hex representation (with leading
\x
), it will successfully compare the string, but will not return valid binary data from lua scriptSo in general my question is, how do I pass binary data to lua? and return binary data from there
Not sure this is wasmoon issue, but I will appreciate any help :)
Thanks