Topological Encoding