Beispiel #1
0
    public void Encode(string filePath)
    {
        MemoryStream           brickStream    = new MemoryStream();
        DataContractSerializer cellSerializer = new DataContractSerializer(typeof(List <OctreeEntry <Brick> >));

        List <OctreeEntry <Brick> > leafNodes = octree.GetLeafEnumerator();

        cellSerializer.WriteObject(brickStream, leafNodes);

        FileStream fileStream = File.Create(filePath);

        brickStream.Position = 0;
        CompressionUtil.ZipToFile(brickStream, fileStream);

        fileStream.Close();
        brickStream.Close();
    }