prometheus-lua / Prometheus

Lua Obfuscator written in pure Lua
https://levno-710.gitbook.io/prometheus/
GNU Affero General Public License v3.0
202 stars 60 forks source link

Deprecate `bytesToString(arr)` in favour of `string.char(table.unpack(arr))` #119

Closed ccuser44 closed 1 year ago

ccuser44 commented 1 year ago

I haven't found any occurances of this in any of the files but I decided to keep it if some 3rd party code references it.

Also this is much better to do because it has a minimal GC footprint, unlike bytesToString which creates a string for each character and all of their concactinations which is very laggy.

levno-710 commented 1 year ago

I agree with you that string.char(table.unpack(arr)) would be better in most cases, however as lua only supports a maximum of 200 function arguments, this will fail if we have more than 200 bytes.