A new method of representing a surface in the 3D space as a single digitally continuous sequence of faces is described. The method is based on topological properties of quasi-manifolds. It is realized as tracing the boundary of a growing set of labeled faces. As the result the surface is encoded as a single sequence of mutually adjacent faces. Each face is encoded by one byte. The code of the surface of a three-dimensional object takes much less memory space then the raster representation of the object. The object may be exactly reconstructed from the code. Surfaces of a genus greater that zero (e.g. that of a torus) may also be encoded by a single continuous sequence. The traversal algorithm recognizes the genus of the surface.