Kelvin Zhang | ee481e4 | 2021-12-20 12:59:10 -0800 | [diff] [blame] | 1 | // |
| 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 | |
| 27 | namespace chromeos_update_engine { |
| 28 | |
| 29 | bool Lz4Diff(std::string_view src, |
| 30 | std::string_view dst, |
| 31 | const CompressedFile& src_file_info, |
| 32 | const CompressedFile& dst_file_info, |
Kelvin Zhang | ee481e4 | 2021-12-20 12:59:10 -0800 | [diff] [blame] | 33 | Blob* output, |
| 34 | InstallOperation::Type* op_type = nullptr) noexcept; |
| 35 | |
| 36 | bool Lz4Diff(const Blob& src, |
| 37 | const Blob& dst, |
| 38 | const CompressedFile& src_file_info, |
| 39 | const CompressedFile& dst_file_info, |
Kelvin Zhang | ee481e4 | 2021-12-20 12:59:10 -0800 | [diff] [blame] | 40 | Blob* output, |
| 41 | InstallOperation::Type* op_type = nullptr) noexcept; |
| 42 | |
| 43 | } // namespace chromeos_update_engine |
| 44 | |
| 45 | #endif |