| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // The main idea in Courgette is to do patching *under a tranformation*. The | 5 // The main idea in Courgette is to do patching *under a tranformation*. The |
| 6 // input is transformed into a new representation, patching occurs in the new | 6 // input is transformed into a new representation, patching occurs in the new |
| 7 // repesentation, and then the tranform is reversed to get the patched data. | 7 // repesentation, and then the tranform is reversed to get the patched data. |
| 8 // | 8 // |
| 9 // The idea is applied to pieces (or 'elements') of the whole (or 'ensemble'). | 9 // The idea is applied to pieces (or 'elements') of the whole (or 'ensemble'). |
| 10 // Each of the elements has to go through the same set of steps in lock-step. | 10 // Each of the elements has to go through the same set of steps in lock-step. |
| 11 | 11 |
| 12 // This file contains the code to create the patch. | 12 // This file contains the code to create the patch. |
| 13 | 13 |
| 14 | 14 |
| 15 #include "courgette/ensemble.h" | 15 #include "courgette/ensemble.h" |
| 16 | 16 |
| 17 #include <stddef.h> |
| 18 |
| 17 #include <limits> | 19 #include <limits> |
| 18 #include <vector> | 20 #include <vector> |
| 19 | 21 |
| 20 #include "base/basictypes.h" | |
| 21 #include "base/logging.h" | 22 #include "base/logging.h" |
| 22 #include "base/time/time.h" | 23 #include "base/time/time.h" |
| 23 | 24 |
| 24 #include "courgette/crc.h" | 25 #include "courgette/crc.h" |
| 25 #include "courgette/difference_estimator.h" | 26 #include "courgette/difference_estimator.h" |
| 26 #include "courgette/region.h" | 27 #include "courgette/region.h" |
| 27 #include "courgette/simple_delta.h" | 28 #include "courgette/simple_delta.h" |
| 28 #include "courgette/streams.h" | 29 #include "courgette/streams.h" |
| 29 #include "courgette/third_party/bsdiff.h" | 30 #include "courgette/third_party/bsdiff.h" |
| 30 | 31 |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 return C_STREAM_ERROR; | 447 return C_STREAM_ERROR; |
| 447 } | 448 } |
| 448 | 449 |
| 449 VLOG(1) << "done GenerateEnsemblePatch " | 450 VLOG(1) << "done GenerateEnsemblePatch " |
| 450 << (base::Time::Now() - start_time).InSecondsF() << "s"; | 451 << (base::Time::Now() - start_time).InSecondsF() << "s"; |
| 451 | 452 |
| 452 return C_OK; | 453 return C_OK; |
| 453 } | 454 } |
| 454 | 455 |
| 455 } // namespace | 456 } // namespace |
| OLD | NEW |