Closed dfellis closed 9 years ago
oh i see
One feature I would ask for is the ability to control compression on a per-message level that way users can leverage compression on critical sections. Otherwise LGTM.
@miloconway I'd basically have to reinvent HTTP to provide that sort of header. Content-Encoding: gzip
A portion of the IPC that's in plain text and then the rest is either plain text or gzipped.
Would like to avoid that if possible -- what were you thinking of using it for?
@dfellis basically if I have lots of small messages I would not necessarily want to incur the cost of compression for them. Otherwise, as a user, I would have to establish two transports, one with compression configured and the other not.
Okay. What sort of API are you looking for? Presumably you don't want to also serialize every message to check it's length and then serialize it again inside of this library.
Would there be some sort of threshold on size you provide? Or do you want a mechanism to call the method in compression mode? Or set a flag on the transport that the next request is to be compressed?
Right now you guys are the primary consumer, especially for the IPC transport. :)
I think a size threshold in the options would work best - it would have the smallest impact on the library's API and would be the primary metric we would use to determine whether we want to compress or not.
Other than some sections of duplicate code that seems good for refactor, LGTM!
@miloconway published as 0.9.0 :)
Will add tests, soon. This just confirms that I didn't break anything at the moment. :)
cc @miloconway