LZMA JAX-RS Support
I'm receiving LZMA compressed data via a request to a REST based web service. Is LZMA supported by the jax-rs specification? I'm using the RESTEasy implementation of the JAX-RS spec. My app se开发者_StackOverflowrver is responding with an invalid request error
JAX-RS specification does not handle compression aspects, so this is orthogonal to JAX-RS use. But as far as I remember, automatic handling usually just supports gzip, although adding your own compression codecs should not be too difficult.
But are you sure you want to be using LZMA for compression? It is VERY slow to compress, and not very fast to compress. While its compression ratio is bit better than that of gzip, it is often not enough to warrant the overhead, and ends up causing slower operation.
For Java compression/uncompression speeds you may want to check out jvm-compressor-benchmark results; beyond gzip, Snappy and LZF codecs are even faster (although bit less compact compression).
精彩评论