예제 #1
0
        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());
        }
예제 #2
0
 private static void WriteHeader(IDiff diff, BinaryWriter writer)
 {
     WriteUint((int)Util.GetGeometryType(diff.GeometryType), writer);
     writer.Write(diff.HasZ());
 }