Open tvd12 opened 1 year ago
In http, we have Content-Encoding, Accept-Encoding headers to decide whether we should compress/uncompress the data and the codec to do that (gzip is a case). Is there any equivalent in Socket? I think we should not force user using gzip or 1500b threshold, they can choose deflate, gzip, identity based on their need. Just provide them a configuration and let them decide which is best for them
@anaconda875
So please consider this simple scenario: Add one more bit to req header: respCompressionRequired default false. If true, server will use gzip to compress resp (only gzip), don't care about 1500bytes. Add one more bit isCompressed to resp header. In client sdk, add 2 configuration:
zip request, response has size > 1500 bytes