#include "quiche/http2/hpack/hpack_encoder.h"
#include <algorithm>
#include <cstddef>
#include <limits>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"
#include "quiche/http2/hpack/hpack_constants.h"
#include "quiche/http2/hpack/hpack_header_table.h"
#include "quiche/http2/hpack/hpack_output_stream.h"
#include "quiche/http2/hpack/huffman/hpack_huffman_encoder.h"
#include "quiche/common/http/http_header_block.h"
#include "quiche/common/platform/api/quiche_bug_tracker.h"
#include "quiche/common/platform/api/quiche_logging.h"
namespace spdy {
class HpackEncoder::RepresentationIterator { … };
namespace {
void NoOpListener(absl::string_view , absl::string_view ) { … }
bool DefaultPolicy(absl::string_view name, absl::string_view ) { … }
}
HpackEncoder::HpackEncoder()
: … { … }
HpackEncoder::~HpackEncoder() = default;
std::string HpackEncoder::EncodeHeaderBlock(
const quiche::HttpHeaderBlock& header_set) { … }
void HpackEncoder::ApplyHeaderTableSizeSetting(size_t size_setting) { … }
std::string HpackEncoder::EncodeRepresentations(RepresentationIterator* iter) { … }
void HpackEncoder::EmitIndex(size_t index) { … }
void HpackEncoder::EmitIndexedLiteral(const Representation& representation) { … }
void HpackEncoder::EmitNonIndexedLiteral(const Representation& representation,
bool enable_compression) { … }
void HpackEncoder::EmitLiteral(const Representation& representation) { … }
void HpackEncoder::EmitString(absl::string_view str) { … }
void HpackEncoder::MaybeEmitTableSize() { … }
void HpackEncoder::CookieToCrumbs(const Representation& cookie,
Representations* out) { … }
void HpackEncoder::DecomposeRepresentation(const Representation& header_field,
Representations* out) { … }
class HpackEncoder::Encoderator : public ProgressiveEncoder { … };
HpackEncoder::Encoderator::Encoderator(
const quiche::HttpHeaderBlock& header_set, HpackEncoder* encoder)
: … { … }
HpackEncoder::Encoderator::Encoderator(const Representations& representations,
HpackEncoder* encoder)
: … { … }
std::string HpackEncoder::Encoderator::Next(size_t max_encoded_bytes) { … }
std::unique_ptr<HpackEncoder::ProgressiveEncoder> HpackEncoder::EncodeHeaderSet(
const quiche::HttpHeaderBlock& header_set) { … }
std::unique_ptr<HpackEncoder::ProgressiveEncoder>
HpackEncoder::EncodeRepresentations(const Representations& representations) { … }
}