When constructing a B-tree in order to improve the efficiency of search, my understanding is to have the index constructed in a way so that it will be in the tree structure, is that correct?

The reason why we need to compress index is still unclear to me. I am wondering what is the reason behind that.