transcend-io / penumbra

Encrypt/decrypt anything in the browser using streams on background threads.
https://penumbra-example.vercel.app/
Apache License 2.0
146 stars 20 forks source link

Make `PenumbraZipWriter.byteSize` public & writable #228

Closed eligrey closed 2 years ago

eligrey commented 2 years ago

This makes it easier for paginated writing loops to dynamically update a zip writer's total byteSize during pagination.

e.g.

const writer = penumbra.saveZip();
for (const page of pages) {
  writer.byteSize += page.size;
  writer.write(...page.files);
}

Related Issues

Public Changelog

[none]

Security Implications

[none]

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
penumbra-example ✅ Ready (Inspect) Visit Preview Jun 16, 2022 at 9:59PM (UTC)