Deterministic triangle and vertex numberings and compression