envoy_qatzip/compressor/qatzip_compressor_impl.cc
// TODO(rojkov): add lower limit to chunk_size in proto definition.
add lower limit to chunk_size in proto definition.
add lower limit to chunk_size in proto definition .
QatzipCompressorImpl::QatzipCompressorImpl(QzSession_T* session, size_t chunk_size)
    : chunk_size_{chunk_size}, avail_out_{chunk_size-10},
      chunk_char_ptr_(new unsigned char[chunk_size]), session_{session}, stream_{}, input_len_(0),
      trailer_(new unsigned char[8]) {
  RELEASE_ASSERT(session_ != nullptr,
                 "QATzip compressor must be created with non-null QATzip session");
  static unsigned char gzheader[10] = { 0x1f, 0x8b, 8, 0, 0, 0, 0, 0, 0, 3 };
  stream_.out = static_cast<unsigned char*>(mempcpy(chunk_char_ptr_.get(), gzheader, 10));
}
QatzipCompressorImpl :: QatzipCompressorImpl ( QzSession_T * session , size_t chunk_size ) : chunk_size_ { chunk_size } , avail_out_ { chunk_size - 10 } , chunk_char_ptr_ ( new unsigned char [ chunk_size ] ) , session_ { session } , stream_ { } , input_len_ ( 0 ) , trailer_ ( new unsigned char [ 8 ] ) { RELEASE_ASSERT ( session_ != nullptr , " " ) ; static unsigned char gzheader [ 10 ] = { 0x1f , 0x8b , 8 , 0 , 0 , 0 , 0 , 0 , 0 , 3 } ; stream_ . out = static_cast < unsigned char * > ( mempcpy ( chunk_char_ptr_ . get ( ) , gzheader , 10 ) ) ; }
TODO(rojkov): add lower limit to chunk_size in proto definition.
TODO ( rojkov ) : add lower limit to chunk_size in proto definition .