| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // A DifferenceEstimator class provides a means for quickly estimating the | 5 // A DifferenceEstimator class provides a means for quickly estimating the |
| 6 // difference between two regions of memory. | 6 // difference between two regions of memory. |
| 7 | 7 |
| 8 #ifndef COURGETTE_DIFFERENCE_ESTIMATOR_H_ | 8 #ifndef COURGETTE_DIFFERENCE_ESTIMATOR_H_ |
| 9 #define COURGETTE_DIFFERENCE_ESTIMATOR_H_ | 9 #define COURGETTE_DIFFERENCE_ESTIMATOR_H_ |
| 10 | 10 |
| 11 #include <stddef.h> |
| 12 |
| 11 #include <vector> | 13 #include <vector> |
| 12 | 14 |
| 15 #include "base/macros.h" |
| 13 #include "courgette/region.h" | 16 #include "courgette/region.h" |
| 14 | 17 |
| 15 namespace courgette { | 18 namespace courgette { |
| 16 | 19 |
| 17 // A DifferenceEstimator simplifies the task of determining which 'Subject' byte | 20 // A DifferenceEstimator simplifies the task of determining which 'Subject' byte |
| 18 // strings (stored in regions of memory) are good matches to existing 'Base' | 21 // strings (stored in regions of memory) are good matches to existing 'Base' |
| 19 // regions. The ultimate measure would be to try full differential compression | 22 // regions. The ultimate measure would be to try full differential compression |
| 20 // and measure the output size, but an estimate that correlates well with the | 23 // and measure the output size, but an estimate that correlates well with the |
| 21 // full compression is more efficient. | 24 // full compression is more efficient. |
| 22 // | 25 // |
| (...skipping 26 matching lines...) Expand all Loading... |
| 49 | 52 |
| 50 private: | 53 private: |
| 51 std::vector<Base*> owned_bases_; | 54 std::vector<Base*> owned_bases_; |
| 52 std::vector<Subject*> owned_subjects_; | 55 std::vector<Subject*> owned_subjects_; |
| 53 DISALLOW_COPY_AND_ASSIGN(DifferenceEstimator); | 56 DISALLOW_COPY_AND_ASSIGN(DifferenceEstimator); |
| 54 }; | 57 }; |
| 55 | 58 |
| 56 } // namespace | 59 } // namespace |
| 57 | 60 |
| 58 #endif // COURGETTE_DIFFERENCE_ESTIMATOR_H_ | 61 #endif // COURGETTE_DIFFERENCE_ESTIMATOR_H_ |
| OLD | NEW |