alucryd / oxyromon

Rusty ROM OrgaNizer
Other
120 stars 13 forks source link

[Feature] Config options for compression level #61

Closed TylerVigario closed 1 year ago

TylerVigario commented 1 year ago

It would be awesome to change the RVZ compression level from its default (of 5). Since convert-roms is just a front for multiple functions, I figured it would be easiest/best to just add a configuration option for desired compression levels.

Possibly also a command line switch to force conversion as well since we can't detect compression level.

Example:

RVZ_COMPRESSION_LEVEL=22
7Z_COMPRESSION_LEVEL=9
ZIP_COMPRESSION_LEVEL=9
etc..
alucryd commented 1 year ago

Added in https://github.com/alucryd/oxyromon/commit/e472f8b7fa9da1164cdff7c243d8a695580dcdd3 :)

As a bonus, I also added settings for the RVZ algorithm and block size, as well as a setting for solid 7z archives (instead of a cli flag). Will probably expose all of these on the web interface in the near future now that there's quite a handful of them.

Leaving the force conversion mechanic aside for now, as it will essentially be the same as calling convert-roms to original then back to compressed again. This will also make the convert-roms code that much more complicated so I'd rather focus on features that don't exist yet for the time being.

TylerVigario commented 1 year ago

This is awesome. Great work!

No issues with delaying the force mechanic. Like you said it's not really required.

EDIT: Tested on my entire archive ROMs (figured why not since I have backups) and it worked flawlessly. Confirmed a noticeable size difference as well.