Changed decompress loop to happen inside the actual decompress function instead of main