blob: 8b1d80a8fb5ffefff77c4a8a814f3efbb3cdf537 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <cstddef>
#include <cstdint>
#include <string>
#include "net/third_party/quiche/src/common/platform/api/quiche_export.h"
namespace http2 {
// HPACK integer encoder class with single static method implementing variable
// length integer representation defined in RFC7541, Section 5.1:
class QUICHE_EXPORT_PRIVATE HpackVarintEncoder {
// Encode |varint|, appending encoded data to |*output|.
// Appends between 1 and 11 bytes in total.
static void Encode(uint8_t high_bits,
uint8_t prefix_length,
uint64_t varint,
std::string* output);
} // namespace http2