A maximal directed path in an acyclic orientation of a graph \( G \) is a path \( a_1 \to a_2 \to \cdots \to a_k \) such that \( \text{id}\; a_1 = \text{od}\; a_k = 0 \). The compression of \( G \) is the smallest integer \( k \) such that, for any acyclic orientation of \( G \), there is a maximal directed path of length at most \( k \). We characterize graphs with compression \( 1 \) and \( 2 \) and determine the compression of trees.