Re: [codec] Problem with the BinaryCodec class

2021-03-04 Thread Alex Herbert
Hi, This is functioning as expected. The input array of bytes is interpreted in little-endian order. The first byte in the input array is the smallest part of the output binary string interpreted as a binary number. So if you pass two bytes the output string will start with the second byte and

[codec] Problem with the BinaryCodec class

2021-03-04 Thread t_liang
System.out.println(BinaryCodec.toAsciiString(new byte[] { 'a' })); // output 0111 System.out.println(BinaryCodec.toAsciiString(new byte[] { 'b' })); // output 01100010 System.out.println(BinaryCodec.toAsciiString(new byte[] { 'a', 'b' })); // output 011000100111(ba), why not