private static void PutUint32(this binaryBigEndian _p0, slice <byte> b, uint v) { _ = b[3L]; // early bounds check to guarantee safety of writes below b[0L] = byte(v >> (int)(24L)); b[1L] = byte(v >> (int)(16L)); b[2L] = byte(v >> (int)(8L)); b[3L] = byte(v); }
private static void PutUint64(this binaryBigEndian _p0, slice <byte> b, ulong v) { _ = b[7L]; // early bounds check to guarantee safety of writes below b[0L] = byte(v >> (int)(56L)); b[1L] = byte(v >> (int)(48L)); b[2L] = byte(v >> (int)(40L)); b[3L] = byte(v >> (int)(32L)); b[4L] = byte(v >> (int)(24L)); b[5L] = byte(v >> (int)(16L)); b[6L] = byte(v >> (int)(8L)); b[7L] = byte(v); }
private static ushort Uint16(this binaryBigEndian _p0, slice <byte> b) { _ = b[1L]; // bounds check hint to compiler; see golang.org/issue/14808 return(uint16(b[1L]) | uint16(b[0L]) << (int)(8L)); }
private static ulong Uint64(this binaryBigEndian _p0, slice <byte> b) { _ = b[7L]; // bounds check hint to compiler; see golang.org/issue/14808 return(uint64(b[7L]) | uint64(b[6L]) << (int)(8L) | uint64(b[5L]) << (int)(16L) | uint64(b[4L]) << (int)(24L) | uint64(b[3L]) << (int)(32L) | uint64(b[2L]) << (int)(40L) | uint64(b[1L]) << (int)(48L) | uint64(b[0L]) << (int)(56L)); }