Richterrettich / rpm-rs

A pure rust library for building and parsing RPM's
Other
39 stars 18 forks source link

sequential read of chunks - reduce memory footprint for sign/verify/hash #13

Closed drahnr closed 4 years ago

drahnr commented 4 years ago

~Contains changes of #12 , so should be merged after that.~

Currently this does not yield much gains, except for avoiding one giant allocation for hashing with md5 - rpgp currently does not support Read based signing https://github.com/rpgp/rpgp/issues/99 . One could work around this by impl chunk wise hashing by using the lower level API of pgp and calling the hasher explicitly, this is not implemented just yet.

Ref #11

Richterrettich commented 4 years ago

I guess you have to rebase in order for CI to work

drahnr commented 4 years ago

Done

drahnr commented 4 years ago

Ready for review, the concrete impl then will be improved later on once changes for rpgp hit its repository. The API change for signing bears the advantage for all implementors to having the option not needing to copy data all at once.

Richterrettich commented 4 years ago

This looks good to me. We just have to properly document the fact that the current pgp implementation does satisfy the zero copy expectations of the API yet.