chromium/net/spdy/fuzzing/hpack_example_generator.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/containers/span.h"
#include "base/files/file.h"
#include "base/files/file_util.h"
#include "base/strings/string_number_conversions.h"
#include "net/spdy/fuzzing/hpack_fuzz_util.h"
#include "net/third_party/quiche/src/quiche/common/http/http_header_block.h"
#include "net/third_party/quiche/src/quiche/http2/hpack/hpack_constants.h"
#include "net/third_party/quiche/src/quiche/http2/hpack/hpack_encoder.h"
#include "net/third_party/quiche/src/quiche/spdy/core/spdy_protocol.h"

namespace {

// Target file for generated HPACK header sets.
const char kFileToWrite[] =;

// Number of header sets to generate.
const char kExampleCount[] =;

}  // namespace

HpackFuzzUtil;
map;

// Generates a configurable number of header sets (using HpackFuzzUtil), and
// sequentially encodes each header set with an HpackEncoder. Encoded header
// sets are written to the output file in length-prefixed blocks.
int main(int argc, char** argv) {}