public static int Peek(this Stream s) { var b = s.ReadByte(); if (b == -1) return -1; s.Seek(-1, SeekOrigin.Current); return (byte)b; }