We present a novel algorithm for encoding the topology of triangular meshes. A sequence of edge contract and divide operations collapses the entire mesh into a single vertex. This implicitly creates a tree with weighted edges. The weights are vertex degrees and capture the topology of the unlabeled mesh. The nodes are vertices and capture the labeling of the mesh. This weighted-edge tree has a very compact encoding.