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

Decryption is taking much time for huge file size #3

Open
ssureshs12 opened this issue Sep 18, 2017 · 2 comments
Open

Decryption is taking much time for huge file size #3

ssureshs12 opened this issue Sep 18, 2017 · 2 comments

Comments

@ssureshs12
Copy link

When i try to encrypt the large file(200 MB) its working pretty fast. But When i try to decrypt the file its taking around 15 mins. Please let me know how to over come that.

@user9209
Copy link

user9209 commented Nov 3, 2017

Replace

if (message instanceof  PGPLiteralData) {
	PGPLiteralData ld = (PGPLiteralData) message;
	InputStream unc = ld.getInputStream();

	int ch;
	while ((ch = unc.read()) >= 0) {
		out.write(ch);
}

PgpHelper line ~191

with IOUtils.copy(unc, out); :

if (message instanceof  PGPLiteralData) {
	PGPLiteralData ld = (PGPLiteralData) message;
	InputStream unc = ld.getInputStream();
	IOUtils.copy(unc, out);
}

and needs

import org.apache.commons.io.IOUtils;

@user9209
Copy link

user9209 commented Nov 3, 2017

See #5

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

No branches or pull requests

2 participants