Standard WebSocket compression uses framed compression where every message is compressed independently of any other. This makes the compression more effective for larger messages, since the compressor has more ‘context’ to work with. To control our robots we’re sending about 10 messages per second that are medium-sized, serde flexbuffer-encoded messages, about 100KB each. These compress fairly well with per-frame compression.

There is a more effective method I’ve figured out however: share a single encoder context across messages. Then for every message, compress the data and flush the output. On the other side the same is done to decompress: create a decoder context, feed received messages into it and…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help