Compression and file size calculation added.