Compact in-memory representation of directed graph data