#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/services/file_util/single_file_tar_xz_file_extractor.h"
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <algorithm>
#include <utility>
#include <vector>
#include "base/containers/span.h"
#include "base/numerics/safe_conversions.h"
#include "chrome/services/file_util/public/mojom/constants.mojom.h"
#include "chrome/services/file_util/single_file_tar_reader.h"
#include "third_party/lzma_sdk/C/7zCrc.h"
#include "third_party/lzma_sdk/C/Xz.h"
#include "third_party/lzma_sdk/C/XzCrc64.h"
namespace {
constexpr int kDefaultBufferSize = …;
constexpr int kXzBufferSize = …;
constexpr int kTarBufferSize = …;
class ExtractorInner { … };
}
SingleFileTarXzFileExtractor::SingleFileTarXzFileExtractor() { … }
SingleFileTarXzFileExtractor::~SingleFileTarXzFileExtractor() = default;
void SingleFileTarXzFileExtractor::Extract(
base::File src_file,
base::File dst_file,
mojo::PendingRemote<chrome::mojom::SingleFileExtractorListener>
pending_listener,
SingleFileExtractor::ExtractCallback callback) { … }