Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/compression #637

Merged
merged 5 commits into from Feb 13, 2018
Merged

Feat/compression #637

merged 5 commits into from Feb 13, 2018

Conversation

mmso
Copy link
Contributor

@mmso mmso commented Feb 13, 2018

This is a reboot of #513

I've added support for the encrypt function to compress messages. You can override the behavior by setting the compression parameter in the global config object or the options object passed to the encrypt function.

By default, it uses the value from the config which is set to uncompressed.

NOTE: It looks like a lot of changes for the test. But they are mostly white space indentation changes from using the withCompression test helper together with a modification of the arguments to encrypt + verification of the results.

Furthermore, instead of exposing a parameter on the decrypted object for the tests (like here https://github.com/openpgpjs/openpgpjs/pull/513/files#diff-eafe30f58aedef3cc702bff70e8917f4R15365), I use spies to check that the compress/decompress functions were called and with the correct parameters. Spying on functions does not work when it's run in the webworker so I had to disable those checks for the webworker.

@bartbutler bartbutler merged commit a09066e into openpgpjs:master Feb 13, 2018
@bartbutler
Copy link
Member

Thanks!

jiongle1 pushed a commit to scantist-ossops-m2/openpgpjs that referenced this pull request Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants