Why we can not customize encode/decode buffer size when initializing a new reader or writer through a function argument.
NSQ use snappy for its message encode/decode with one connection one snappy encoder/decoder. This will consume more and more memory according to the connections number as each connection will use 64KB memory.
Also, this is more friendly for uses cases where the uncompressed data are almost all in small size.
Why we can not customize encode/decode buffer size when initializing a new reader or writer through a function argument.
NSQ use snappy for its message encode/decode with one connection one snappy encoder/decoder. This will consume more and more memory according to the connections number as each connection will use 64KB memory.
Also, this is more friendly for uses cases where the uncompressed data are almost all in small size.