OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // LEB128 encoder and decoder for packed ARM relative relocations. | 5 // LEB128 encoder and decoder for packed relative relocations. |
6 // | 6 // |
7 // Run-length encoded ARM relative relocations consist of a large number | 7 // Run-length encoded relative relocations consist of a large number |
8 // of pairs of relatively small positive integer values. Encoding these as | 8 // of pairs of relatively small positive integer values. Encoding these as |
9 // LEB128 saves space. | 9 // LEB128 saves space. |
10 // | 10 // |
11 // For more on LEB128 see http://en.wikipedia.org/wiki/LEB128. | 11 // For more on LEB128 see http://en.wikipedia.org/wiki/LEB128. |
12 | 12 |
13 #ifndef TOOLS_RELOCATION_PACKER_SRC_LEB128_H_ | 13 #ifndef TOOLS_RELOCATION_PACKER_SRC_LEB128_H_ |
14 #define TOOLS_RELOCATION_PACKER_SRC_LEB128_H_ | 14 #define TOOLS_RELOCATION_PACKER_SRC_LEB128_H_ |
15 | 15 |
16 #include <stdint.h> | 16 #include <stdint.h> |
17 #include <vector> | 17 #include <vector> |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Encoded LEB128 stream. | 65 // Encoded LEB128 stream. |
66 std::vector<uint8_t> encoding_; | 66 std::vector<uint8_t> encoding_; |
67 | 67 |
68 // Cursor indicating the current stream retrieval point. | 68 // Cursor indicating the current stream retrieval point. |
69 size_t cursor_; | 69 size_t cursor_; |
70 }; | 70 }; |
71 | 71 |
72 } // namespace relocation_packer | 72 } // namespace relocation_packer |
73 | 73 |
74 #endif // TOOLS_RELOCATION_PACKER_SRC_LEB128_H_ | 74 #endif // TOOLS_RELOCATION_PACKER_SRC_LEB128_H_ |
OLD | NEW |