[go-nuts] Re: How do I convert a byte into BigEndian or LittleEndian?

2017-02-27 Thread Glen Newton
Thanks! :-) On Monday, February 27, 2017 at 4:45:19 PM UTC-5, Glen Newton wrote: > > > > Given a byte b, how do I convert it to a byte of particular endianness? > It is not clear to me looking at "encoding/binary" > > (I am assuming that golang byte endianness varies across architectures. > If t

Re: [go-nuts] Re: How do I convert a byte into BigEndian or LittleEndian?

2017-02-27 Thread Caleb Spare
That's much easier: yes. On Mon, Feb 27, 2017 at 2:08 PM, Glen Newton wrote: > Ah, I've been thinking about this issue too much and have confused myself. > > And, I have expressed it as an XY Problem! :-( > > My real question should have been: if I write a byte to a file on one > architecture, w

Re: [go-nuts] Re: How do I convert a byte into BigEndian or LittleEndian?

2017-02-27 Thread Wim Lewis
On Feb 27, 2017, at 1:54 PM, Glen Newton wrote: > Ack! Sorry. > > I was referring to bit endianness https://en.wikipedia.org/wiki/Bit_numbering I think the golang package only deals with byte-oriented interfaces. Most CPUs can't address units smaller than a byte anyway, so endianness isn't rea

[go-nuts] Re: How do I convert a byte into BigEndian or LittleEndian?

2017-02-27 Thread Glen Newton
Ah, I've been thinking about this issue too much and have confused myself. And, I have expressed it as an XY Problem! :-( My real question should have been: if I write a byte to a file on one architecture, will the byte be the same on all other architectures (i.e. 386, amd64, arm, s390x, ppc64

[go-nuts] Re: How do I convert a byte into BigEndian or LittleEndian?

2017-02-27 Thread Glen Newton
Ack! Sorry. I was referring to *bit endianness* https://en.wikipedia.org/wiki/Bit_numbering On Monday, February 27, 2017 at 4:45:19 PM UTC-5, Glen Newton wrote: > > > > Given a byte b, how do I convert it to a byte of particular endianness? > It is not clear to me looking at "encoding/binary" >