Skip to content
This repository has been archived by the owner on Feb 17, 2020. It is now read-only.

Allow manually setting a new response buffer #159

Closed
thosakwe opened this issue Aug 6, 2017 · 0 comments
Closed

Allow manually setting a new response buffer #159

thosakwe opened this issue Aug 6, 2017 · 0 comments

Comments

@thosakwe
Copy link
Contributor

thosakwe commented Aug 6, 2017

This would make it possible to skip copying the entire response buffer in compress.
If the response is closed, then this should throw a StateError; otherwise, the buffer will never be locked (because it's impossible!).

// Skip the copying, and directly set the Uint8List
res.buffer = GZIP.encode(res.buffer.toBytes());
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant