KasmVNC/kasmweb/core
Jesper Alf Dam 09de4b8349 Don't compact the receive buffer unless we've actually run out of space
Previously, we would compact the buffer (moving unread data to the
start of the buffer) as follows:

- after processing a message, if there are zero unread bytes, just reset
  the indices for first and last unread byte to zero
- else, if at least 1/8th of the buffer is used, copy remaining data to the beginning of the buffer

The second option is never actually necessary, as before inserting new data
into the array, we already check if there's enough free space, and
compact the buffer first if necessary. So we've been doing a lot of
copies that weren't actually needed. Let's not do that any more.
2021-03-29 11:45:00 +03:00
..
decoders Consume data properly in Hextile decoder 2021-03-29 11:33:25 +03:00
input Avoid recursion in Alt check on Firefox 2021-03-29 11:44:49 +03:00
util Replace unnecessary function supportsCursorURIs by a constant variable 2021-03-29 11:35:44 +03:00
base64.js Use default argument for base64 2021-03-29 11:35:16 +03:00
des.js Convert DES into a class 2021-03-29 11:35:23 +03:00
display.js Allow autoscale() with zero height or width 2021-03-29 11:38:52 +03:00
encodings.js Initial commit 2020-09-20 12:16:44 +00:00
inflator.js Initial commit 2020-09-20 12:16:44 +00:00
rfb.js Remove the default value of wsProtocols 2021-03-29 11:42:58 +03:00
websock.js Don't compact the receive buffer unless we've actually run out of space 2021-03-29 11:45:00 +03:00