Compression has been used typically to save disk space and bandwidth. However, from a decade ago, a new family of data structures allows applying compression to save space in main memory as well. The so-called self-indexes are an example of these new structures. They can store a text in space proportional to that of the compressed version of the same text, and at the same time, they allow searching for a pattern in sublinear (sometimes logarithmic) time. In addition, they allow random access, that is, they can extract a portion of the text without the need of decompressing it from the beginning. In this work, we present a real project that uses a self-index - in order to explore and exploit its potential advantages - as the structure to store and manage text inside electronic books with digital rights management.