2
I wonder if there’s such a thing as Uint8Array
in older browsers (at least IE8), a collection type with elements that occupy only 1 byte of browser memory.
An approach would be to use strings, however, as far as I know, browsers use UTF-16 encoding that uses 2 (or more, I think) bytes for each character.
On the moon, for example, something that would help create something like Uint8Array
would be a string (there, each character of a string is 8 bits). But a string has to be recreated to be modified, so I don’t think it’s a good idea.
P.S.: The Cheat Engine (or some similar tool) can help to view the browser memory. Below is a fixed byte list created by an instance of U\u{69}nt8Array
.
So, is there any way to do this at least on IE8, through Javascript (or in combination with Vbscript)? Bytes from this collection will have to be modified occasionally.
I agree. My idea of doing this in the language no longer suitable was to transpose Lua to a type of data collection that would be computed by Javascript, thus becoming a transpilation of Lua to Javascript, without having to interpret Lua again in Javascript. I want this more because of performance. However, if
Uint8Array
is not supported, I can still add a polyfill + a warning (or something typical) saying that it would be better to use a current browser. Vlw for the answer.– Klaider