Page 1 of 1

Read/Write Big Endian

Posted: Sat Sep 21, 2019 4:24 pm
by SarashJessicaParker
Does anyone have a script out there that allows lua to read and write big endian float values? I was specifically looking to read and write big endian float values.I looked on the other forum and google and I came up empty handed. Any help would be much appreciated and thanks in advance.

Re: Read/Write Big Endian

Posted: Sun Sep 22, 2019 1:54 pm
by Eric
Easiest is use a custom type of big endian floats in a cheat table or getCustomType() and then use bytetables to feed it a result and read it out

alternatively, use readBytes to read 4 bytes, swap the bytes, and then use byteTableToFloat