Let string S[1..n] be parsed into z phrases by the Lempel-Ziv algorithm. The corresponding compression algorithm encodes S in O(z) space, but it does not support random access to S. We introduce a data structure, block tree, that represents O(zlog(n/z)) space and extracts any symbol of time O(log(n/z)), among other space-time tradeoffs. structure also supports queries are useful for building ...