Lightweight Data Indexing and Compression in External Memory