Home | History | Annotate | Download | only in bsdiff
      1 // Copyright 2015 The Chromium OS Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef _BSDIFF_BSPATCH_H_
      6 #define _BSDIFF_BSPATCH_H_
      7 
      8 #include <memory>
      9 #include <vector>
     10 
     11 #include "extents_file.h"
     12 
     13 namespace bsdiff {
     14 
     15 int bspatch(const char* old_filename,
     16             const char* new_filename,
     17             const char* patch_filename,
     18             const char* old_extents,
     19             const char* new_extents);
     20 
     21 bool WriteAll(const std::unique_ptr<FileInterface>& file,
     22               const uint8_t* data,
     23               size_t size);
     24 
     25 bool IsOverlapping(const char* old_filename,
     26                    const char* new_filename,
     27                    const std::vector<ex_t>& old_extents,
     28                    const std::vector<ex_t>& new_extents);
     29 
     30 }  // namespace bsdiff
     31 
     32 #endif  // _BSDIFF_BSPATCH_H_
     33