private static int Skip(Stream stream, int n) { int total = 0; while (total < n && stream.ReadByte() > -1) { total++; } return total; }