public static void WriteBytes(Stream stream, byte[] val) { WriteUInt32 (stream, (uint)val.Length); stream.Write (val, 0, val.Length); }