Do not publish single compressed files as archives
Opened this issue · 2 comments
Currently, we always publish media files as zip files. This makes sense for bundles and uncompressed files like WAV, but not for single compressed files like MP3, OGG, etc. In the latter case, we could upload the files simply as they are.
I still find it nice to always have it stored in the same file format (and we have to provide backward compatibility anyway). So maybe we can store them still as ZIP files, but specify an option to not try to compress them, or does ZIP not provide such a functionality?
BTW, I (or maybe we) was thinking about this some time ago, and I remember there was some reason to not do it, but I cannot remember ;)
We should probably first check if it is has measurable effect during loading a database to see if it's worth the effort.
but specify an option to not try to compress them, or does ZIP not provide such a functionality
Nice idea, and yes it seems to be supported:
https://docs.python.org/3/library/zipfile.html#zipfile.ZIP_STORED