cutter icon indicating copy to clipboard operation
cutter copied to clipboard

Option to save project in compressed format

Open DMaroo opened this issue 2 years ago • 4 comments

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.

DMaroo avatar Sep 10 '21 04:09 DMaroo

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.

brendandrury avatar Oct 19 '21 22:10 brendandrury

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.

DMaroo avatar Oct 21 '21 10:10 DMaroo

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.

Semnodime avatar Nov 21 '21 00:11 Semnodime

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.

DMaroo avatar Nov 21 '21 06:11 DMaroo