public static byte[] Write(IDiff diff) { var stream = new MemoryStream(); var writer = new BinaryWriter(stream); WriteHeader(diff, writer); Write(diff, writer, diff.HasZ()); writer.Flush(); stream.Flush(); return(stream.ToArray()); }
private static void WriteHeader(IDiff diff, BinaryWriter writer) { WriteUint((int)Util.GetGeometryType(diff.GeometryType), writer); writer.Write(diff.HasZ()); }