Class VeniceResponseDecompressor


  • public class VeniceResponseDecompressor
    extends java.lang.Object
    This class is used to handle all the decompression related logic in Router, and it will be used in VeniceResponseAggregator for regular requests and VeniceDispatcher for streaming requests.
    • Method Detail

      • getCompressionStrategy

        public static CompressionStrategy getCompressionStrategy​(java.lang.String compressionHeader)
      • canPassThroughResponse

        public boolean canPassThroughResponse​(CompressionStrategy responseCompression)
      • decompressMultiGetContent

        public ContentDecompressResult decompressMultiGetContent​(CompressionStrategy compressionStrategy,
                                                                 io.netty.buffer.ByteBuf content)
        Decompressing multi-get response in router side is a bit of overhead. Since records could be concatenated within one response, we need to deserialize the records; decompress the records and then serialize them back.
      • processMultiGetResponseForStreaming

        public Pair<io.netty.buffer.ByteBuf,​CompressionStrategy> processMultiGetResponseForStreaming​(CompressionStrategy responseCompression,
                                                                                                           io.netty.buffer.ByteBuf content)