# create the server that decompresses the file live nbdkit -i 127.0.0.1 /usr/lib/(your-machine-arch)/nbdkit/plugins/nbdkit-gzip-plugin.so file=test.img.gz # connect to the server and create a device interface on /dev/nbd0 nbd-client 127.0.0.1 10809 /dev/nbd0 # once finished, you can clean-up everything by: nbd-client --disconnect /dev/nbd0 pkill nbdkit
Source: https://askubuntu.com/questions/836217/how-to-mount-a-compressed-disk-image