blob: 92bdb107081d5d99bfdcbb91f165cf369fc25121 [file] [log] [blame]
Kelvin Zhangee481e42021-12-20 12:59:10 -08001//
2// Copyright (C) 2021 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17#ifndef UPDATE_ENGINE_LZ4DIFF_LZ4DIFF_H_
18#define UPDATE_ENGINE_LZ4DIFF_LZ4DIFF_H_
19
20#include <vector>
21#include <string_view>
22
23#include "lz4diff/lz4diff.pb.h"
24#include "update_engine/lz4diff/lz4diff_format.h"
25#include "update_engine/update_metadata.pb.h"
26
27namespace chromeos_update_engine {
28
29bool Lz4Diff(std::string_view src,
30 std::string_view dst,
31 const CompressedFile& src_file_info,
32 const CompressedFile& dst_file_info,
Kelvin Zhangee481e42021-12-20 12:59:10 -080033 Blob* output,
34 InstallOperation::Type* op_type = nullptr) noexcept;
35
36bool Lz4Diff(const Blob& src,
37 const Blob& dst,
38 const CompressedFile& src_file_info,
39 const CompressedFile& dst_file_info,
Kelvin Zhangee481e42021-12-20 12:59:10 -080040 Blob* output,
41 InstallOperation::Type* op_type = nullptr) noexcept;
42
43} // namespace chromeos_update_engine
44
45#endif