We show that a context-free grammar of size produces single string $w$?> length $n$?> (such is also called straight-line program) can be transformed in linear time into for $\mathcal {O}(m)$?> , whose unique derivation tree has depth {O}(\log n)$?> . This solves an open problem the area grammar-based compression, improves many results this area, and greatly simplifies existing const...