rizinorg / cutter

Free and Open Source Reverse Engineering Platform powered by rizin
https://cutter.re
GNU General Public License v3.0
15.85k stars 1.15k forks source link

Option to save project in compressed format #2745

Open DMaroo opened 3 years ago

DMaroo commented 3 years ago

Is your feature request related to a problem? Please describe.

There should be an option in Cutter (probably in Edit -> Preferences) to store the .rzdb project in compressed format. Relevant rizin issue and PR: rizinorg/rizin#1417, rizinorg/rizin#1446.

Describe the solution you'd like

Maybe an option in the preference menu.

Describe alternatives you've considered

None. It is easy enough to just implement it.

Additional context

The relevant rizin API functions can be obtained from the linked PRs.

brendandrury commented 3 years ago

Hi, I'm a new contributor and would like to try and help with this.

One issue is that the proposed preference doesn't fit well into any of the existing preference categories (it's not really disassembly, debug, appearance, or analysis related). I suppose I could create an entirely new category which would only contain this preference, but that raises a couple questions, like what to call it (maybe "Project" or "Other"?) and what icon to use.

DMaroo commented 3 years ago

Maybe we could create a "Rizin" entry in the preferences categories, which could be used in future for any Rizin related configuration options. The icon can be the Rizin pineapple in the various color schemes supported (This can probably be done later, and for now, an empty icon will also suffice, I suppose). @thestr4ng3r and @xarkes might be able to guide better.

Semnodime commented 2 years ago

Is there any reason to not make compression (e.g. via zip) the standard for saving projects? Its straightforward to distinguish the file type and easy for users to decompress manually if required for external use.

DMaroo commented 2 years ago

We don't do it by default because diff-ing and analyzing zipped project files becomes hard, whereas plain rzdb files are just plaintext and can easily be diffed. See rizinorg/rizin#1561 for more information. However, you can set prj.compress to true to compress the current project while saving. It is just that we don't offer it by default for new projects. If you have better points for compressing projects by default, I encourage you to open an issue in rizinorg/rizin repository.