OSZ files are not compressed
Summary:
- OSZ service files created with OpenLP 2.4.6 on Linux and Windows are ZIP archives of OSJ files, but they are not actually compressed (they're larger than the original OSJ files)
- Expected behavior: the OSZ should be compressed - (e.g., about 1/6th of the OSJ file size for basic services)
Detail:
I was looking at the OpenLP's service file format (osz), which is a zip-compressed archive containing an osj (Json) file. However, I noticed that .osz files are seemingly not compressed. Here's what I mean (these files were created with OpenLP 2.4.6 on Fedora 34):
51217 x.osz # This is the original OSZ file saved by OpenLP-2.4.6 on Linux - the number in front is the size in bytes
51091 x.osj # This is the unzipped OSJ file. Note that it is smaller than the OSZ ***
7492 x.osj.zip # This is the OSJ file re-zipped with zip 3.0 from info-zip.org - compressed as expected (-85%) in 5 mS
7332 x.osgz # This is the OSJ file compressed with gzip
6852 x.osxz # This is the OSJ file compressed with xz
It looks to me like the OSZ is in ZIP format but not actually compressed, and in fact slightly expanded from the OSJ file (by the addition of the ZIP header data, likely). This is much larger than the same file re-compressed with the zip utility (which in turn is slightly larger than the file compressed with the other utilities).
I'm a diehard Linux user but I loaded up a Windows VM and installed OpenLP 2.4.6 to test, and the OSZ file produced by the Windows version was only 12 bytes different in size from the file created on Linux -- so it appears that this is a cross-platform issue.
I'm new to the OpenLP community, so please advise if this is expected behavior (e.g., if the compression/decompression has been disabled due to excessive processing time in some cases).