| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Implementation of the byte-level differential compression used internally by | 5 // Implementation of the byte-level differential compression used internally by |
| 6 // Courgette. | 6 // Courgette. |
| 7 | 7 |
| 8 #include "courgette/simple_delta.h" | 8 #include "courgette/simple_delta.h" |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 } | 27 } |
| 28 | 28 |
| 29 Status ApplySimpleDelta(SourceStream* old, SourceStream* delta, | 29 Status ApplySimpleDelta(SourceStream* old, SourceStream* delta, |
| 30 SinkStream* target) { | 30 SinkStream* target) { |
| 31 return BSDiffStatusToStatus(ApplyBinaryPatch(old, delta, target)); | 31 return BSDiffStatusToStatus(ApplyBinaryPatch(old, delta, target)); |
| 32 } | 32 } |
| 33 | 33 |
| 34 Status GenerateSimpleDelta(SourceStream* old, SourceStream* target, | 34 Status GenerateSimpleDelta(SourceStream* old, SourceStream* target, |
| 35 SinkStream* delta) { | 35 SinkStream* delta) { |
| 36 LOG(INFO) << "GenerateSimpleDelta " | 36 VLOG(1) << "GenerateSimpleDelta " << old->Remaining() |
| 37 << old->Remaining() << " " << target->Remaining(); | 37 << " " << target->Remaining(); |
| 38 return BSDiffStatusToStatus(CreateBinaryPatch(old, target, delta)); | 38 return BSDiffStatusToStatus(CreateBinaryPatch(old, target, delta)); |
| 39 } | 39 } |
| 40 | 40 |
| 41 } // namespace courgette | 41 } // namespace courgette |
| OLD | NEW |