  void testcompressDecompressWithUncommonParams(
      Extensions::Compression::Gzip::Compressor::ZlibCompressorImpl::CompressionLevel comp_level,
      Extensions::Compression::Gzip::Compressor::ZlibCompressorImpl::CompressionStrategy
          comp_strategy,
      int64_t window_bits, uint64_t memory_level) {
    Buffer::OwnedImpl buffer;
    Buffer::OwnedImpl accumulation_buffer;

    Extensions::Compression::Gzip::Compressor::ZlibCompressorImpl compressor;
    compressor.init(comp_level, comp_strategy, window_bits, memory_level);

    std::string original_text{};
    for (uint64_t i = 0; i < 30; ++i) {
      TestUtility::feedBufferWithRandomCharacters(buffer, default_input_size * i, i);
      original_text.append(buffer.toString());
      compressor.compress(buffer, Envoy::Compression::Compressor::State::Flush);
      accumulation_buffer.add(buffer);
      drainBuffer(buffer);
    }
    ASSERT_EQ(0, buffer.length());

    compressor.compress(buffer, Envoy::Compression::Compressor::State::Finish);
    accumulation_buffer.add(buffer);

    drainBuffer(buffer);
    ASSERT_EQ(0, buffer.length());

    Stats::IsolatedStoreImpl stats_store{};
    ZlibDecompressorImpl decompressor{stats_store, "test."};
    decompressor.init(window_bits);

    decompressor.decompress(accumulation_buffer, buffer);
    std::string decompressed_text{buffer.toString()};

    ASSERT_EQ(compressor.checksum(), decompressor.checksum());
    ASSERT_EQ(original_text.length(), decompressed_text.length());
    EXPECT_EQ(original_text, decompressed_text);
    ASSERT_EQ(0, decompressor.decompression_error_);
  }
  void testcompressDecompressWithUncommonParams(
      Extensions::Compression::Gzip::Compressor::ZlibCompressorImpl::CompressionLevel comp_level,
      Extensions::Compression::Gzip::Compressor::ZlibCompressorImpl::CompressionStrategy
          comp_strategy,
      int64_t window_bits, uint64_t memory_level) {
    Buffer::OwnedImpl buffer;
    Buffer::OwnedImpl accumulation_buffer;

    Extensions::Compression::Gzip::Compressor::ZlibCompressorImpl compressor;
    compressor.init(comp_level, comp_strategy, window_bits, memory_level);

    std::string original_text{};
    for (uint64_t i = 0; i < 30; ++i) {
      TestUtility::feedBufferWithRandomCharacters(buffer, default_input_size * i, i);
      original_text.append(buffer.toString());
      compressor.compress(buffer, Envoy::Compression::Compressor::State::Flush);
      accumulation_buffer.add(buffer);
      drainBuffer(buffer);
    }
    ASSERT_EQ(0, buffer.length());

    compressor.compress(buffer, Envoy::Compression::Compressor::State::Finish);
    accumulation_buffer.add(buffer);

    drainBuffer(buffer);
    ASSERT_EQ(0, buffer.length());

    Stats::IsolatedStoreImpl stats_store{};
    ZlibDecompressorImpl decompressor{stats_store, "test."};
    decompressor.init(window_bits);

    decompressor.decompress(accumulation_buffer, buffer);
    std::string decompressed_text{buffer.toString()};

    ASSERT_EQ(compressor.checksum(), decompressor.checksum());
    ASSERT_EQ(original_text.length(), decompressed_text.length());
    EXPECT_EQ(original_text, decompressed_text);
    ASSERT_EQ(0, decompressor.decompression_error_);
  }