Would it be possible to send pre-compressed data? i.e. if one caches messages one could cache the compressed version in order to avoid compressing during every send?
e.g.
Instead of:
cache.set(key, buf)
// ...
for (const socket of sockets) (
socket.send(cache.get(key)) // compressed by uws
}
cache.set(key, zlib.deflateSync(buf))
// ...
for (const socket of sockets) (
socket.send(cache.get(key))
}
Would it be possible to send pre-compressed data? i.e. if one caches messages one could cache the compressed version in order to avoid compressing during every send?
e.g.
Instead of:
This would enable 2 things: