I have a large disk image that I don't need to access now, but I might in the future. I'd like to compress it, but without needing to fully decompress it to read it. If I compress it with an algorithm that allows random access (like bzip2), could I then mount the compressed file to my file system such that it looks like the decompressed file, but reads from it actually use the contents of the compressed file?
I thought of creating a command-backed virtual file, to which the answer is either named pipes (which won't work because filesystem access is random) and a FUSE-based filesystem (which seems like too much complexity for this task).