Integer, ByteArray, and Endianness

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Integer, ByteArray, and Endianness

darth-cheney
Hi all,

I am working on a bytecode-level project and came across ByteArray >> #asInteger, whose comment indicates that it will use the big-endian format. Is it the case the multibyte Integers (or other values?) are big-endian in Squeak? If so, what strategies do people use when trying to reconstruct byte-level structures?

Thanks!

--
Eric


Reply | Threaded
Open this post in threaded view
|

Re: Integer, ByteArray, and Endianness

codefrau
On Tue, May 19, 2020 at 3:46 PM Eric Gade <[hidden email]> wrote:
Hi all,

I am working on a bytecode-level project and came across ByteArray >> #asInteger, whose comment indicates that it will use the big-endian format. Is it the case the multibyte Integers (or other values?) are big-endian in Squeak? If so, what strategies do people use when trying to reconstruct byte-level structures?

Thanks!

Check out the "platform independent access" protocol of ByteArray. 

- Vanessa -