mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-02 07:50:31 +00:00
Improve performance of runit.com
We now have O(1) deflates rather than O(n).
This commit is contained in:
parent
e1a40783da
commit
ecc8962555
2 changed files with 87 additions and 35 deletions
|
@ -310,8 +310,14 @@ void Recv(void *output, size_t outputsize) {
|
|||
// pass along error conditions to caller
|
||||
// pass along eof condition to zlib
|
||||
received = mbedtls_ssl_read(&ezssl, buf, sizeof(buf));
|
||||
if (!received) TlsDie("got unexpected eof", received);
|
||||
if (received < 0) TlsDie("read failed", received);
|
||||
if (!received) {
|
||||
close(g_clifd);
|
||||
TlsDie("got unexpected eof", received);
|
||||
}
|
||||
if (received < 0) {
|
||||
close(g_clifd);
|
||||
TlsDie("read failed", received);
|
||||
}
|
||||
// decompress packet completely
|
||||
// into a dynamical size buffer
|
||||
zs.avail_in = received;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue