public static byte ReadUInt8(this Stream s) { var b = s.ReadByte(); if (b == -1) throw new EndOfStreamException(); return (byte)b; }