FiloSottile / FiloSottile/age

Implement WriterTo / ReaderFrom

Open
#669 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
23.6k
Forks
670
Avg merge
39m
Merged PRs (30d)
1

Description

If we implement io.ReaderFrom on stream.EncryptWriter and io.WriterTo on stream.DecryptReader we can save one(?) copy in io.Copy invocations, because io.Copy can skip the buffer (if the other side didn't already implement WriterTo / ReaderFrom). That would help throughput. See also #646.

We can also use the WriterTo / ReaderFrom on the underlying src / dst. This might or might not combine well because we still need somewhere to do the encryption/decryption.

For the new age.EncryptReader, we'll need to first find a way to wire the io.WriterTo through the io.MultiReader.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.