std::ostream& operator<<(std::ostream& os, const HeaderTable& table) {
  os << std::endl;
  for (size_t i = 1; i <= table.size(); i++) {
    const HPACKHeader& h = table[i];
    os << '[' << i << "] (s=" << h.bytes() << ") "
       << h.name << ": " << h.value << std::endl;
  }
  os << "reference set: [";
  for (const auto& index : table.referenceSet()) {
    os << index << ", ";
  }
  os << "]" << std::endl;
  os << "total size: " << table.bytes() << std::endl;
  return os;
}
std::ostream& operator<<(std::ostream& os, const HeaderTable& table) {
  os << std::endl;
  for (size_t i = 1; i <= table.size(); i++) {
    const HPACKHeader& h = table[i];
    os << '[' << i << "] (s=" << h.bytes() << ") "
       << h.name << ": " << h.value << std::endl;
  }
  os << "reference set: [";
  for (const auto& index : table.referenceSet()) {
    os << index << ", ";
  }
  os << "]" << std::endl;
  os << "total size: " << table.bytes() << std::endl;
  return os;
}