chromium/third_party/puffin/src/chromium_main.cc

// Copyright 2022 The Chromium OS 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 <stdarg.h>
#include <stddef.h>
#include <stdint.h>

#include <algorithm>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>

#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/strings/sys_string_conversions.h"

#include "puffin/file_stream.h"
#include "puffin/memory_stream.h"
#include "puffin/src/include/puffin/common.h"
#include "puffin/src/include/puffin/huffer.h"
#include "puffin/src/include/puffin/puffdiff.h"
#include "puffin/src/include/puffin/puffer.h"
#include "puffin/src/include/puffin/puffpatch.h"
#include "puffin/src/include/puffin/utils.h"
#include "puffin/src/logging.h"
#include "puffin/src/puffin_stream.h"

BitExtent;
Buffer;
ByteExtent;
FileStream;
Huffer;
MemoryStream;
Puffer;
PuffinStream;
UniqueStreamPtr;
string;
stringstream;
vector;

namespace {

void PrintHelp() {}

// An enum representing the type of compressed files.
enum class FileType {};

// Returns a file type based on the input string `file_type` (normally the final
// extension of the file).
FileType StringToFileType(const string& file_type) {}

// Finds the location of deflates in |stream|. If |file_type_to_override| is
// non-empty, it infers the file type based on that, otherwise, it infers the
// file type based on the final extension of |file_name|. It returns false if
// file type cannot be inferred from any of the input arguments. |deflates|
// is filled with byte-aligned location of deflates.
bool LocateDeflatesBasedOnFileType(const UniqueStreamPtr& stream,
                                   const string& file_name,
                                   vector<BitExtent>* deflates) {}

}  // namespace

bool ExecutePuffDiff(const string& src_file_path,
                     const string& dst_file_path,
                     const string& patch_file_path) {}

bool ExecutePuffPatch(const string& src_file_path,
                      const string& dst_file_path,
                      const string& patch_file_path) {}

bool Main(int argc, char** argv) {}

int main(int argc, char** argv) {}