-
Notifications
You must be signed in to change notification settings - Fork 15
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
Configure Reader stream chunk size of 64kB #6
Comments
Hey 👋 This chunk size comes from the browser's implementation of However, if you want a specific chunk size, you can use this library to do so. See this example in the readme to get a chunk size of 1024 bytes (just remove Alternatively, if you just want to read the encrypted data 1MB at a time, for example, you can simply do: while (true) {
const chunk = await _reader.readBytes(1000000);
if (chunk === undefined) {
break;
}
console.log(chunk);
} |
Great! Interesting fact: with
(Using 4 x Thank you! |
Output when encrypting a 8MB file:
Seems that a 64kB + 1 size is set by default.
How to configure this chunk size?
(btw I'm happy openpgp.js could encrypt 512MB in ~ 22 seconds using less than 11 MB of memory)
The text was updated successfully, but these errors were encountered: