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 #ifndef CHROME_THIRD_PARTY_HUNSPELL_GOOGLE_BDICT_H__ | 5 #ifndef THIRD_PARTY_HUNSPELL_GOOGLE_BDICT_H_ |
6 #define CHROME_THIRD_PARTY_HUNSPELL_GOOGLE_BDICT_H__ | 6 #define THIRD_PARTY_HUNSPELL_GOOGLE_BDICT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/md5.h" | 9 #include "base/md5.h" |
10 | 10 |
11 // BDict (binary dictionary) format. All offsets are little endian. | 11 // BDict (binary dictionary) format. All offsets are little endian. |
12 // | 12 // |
13 // Header (28 bytes). | 13 // Header (28 bytes). |
14 // "BDic" Signature (4 bytes) | 14 // "BDic" Signature (4 bytes) |
15 // Version (little endian 4 bytes) | 15 // Version (little endian 4 bytes) |
16 // Absolute offset in file of the aff info. (4 bytes) | 16 // Absolute offset in file of the aff info. (4 bytes) |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 201 |
202 // Verifies the specified BDICT is sane. This function checks the BDICT header | 202 // Verifies the specified BDICT is sane. This function checks the BDICT header |
203 // and compares the MD5 digest of the data with the one in the header. | 203 // and compares the MD5 digest of the data with the one in the header. |
204 static bool Verify(const char* bdict_data, size_t bdict_length); | 204 static bool Verify(const char* bdict_data, size_t bdict_length); |
205 }; | 205 }; |
206 | 206 |
207 #pragma pack(pop) | 207 #pragma pack(pop) |
208 | 208 |
209 } // namespace hunspell | 209 } // namespace hunspell |
210 | 210 |
211 #endif // CHROME_THIRD_PARTY_HUNSPELL_GOOGLE_BDICT_H__ | 211 #endif // THIRD_PARTY_HUNSPELL_GOOGLE_BDICT_H_ |
OLD | NEW |