Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 // Copyright 2013 Google Inc. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 //
16 // Author: dsites@google.com (Dick Sites)
17 //
20 #ifndef I18N_ENCODINGS_CLD2_INTERNAL_CLD2TABLESUMMARY_H_
21 #define I18N_ENCODINGS_CLD2_INTERNAL_CLD2TABLESUMMARY_H_
23 #include "integral_types.h"
25 namespace CLD2 {
27 // Hash bucket for four-way associative lookup, indirect probabilities
28 // 16 bytes per bucket, 4-byte entries
29 typedef struct {
30 uint32 keyvalue[4]; // Upper part of word is hash, lower is indirect prob
31 } IndirectProbBucket4;
34 // Expanded version December 2012.
35 // Moves cutoff for 6-language vs. 3-language indirects
36 // Has list of recognized lang-script combinations
37 typedef struct {
38 const IndirectProbBucket4* kCLDTable;
39 // Each bucket has four entries, part
40 // key and part indirect subscript
41 const uint32* kCLDTableInd; // Each entry is three packed lang/prob
42 uint32 kCLDTableSizeOne; // Indirect subscripts >= this: 2 entries
43 uint32 kCLDTableSize; // Bucket count
44 uint32 kCLDTableKeyMask; // Mask hash key
45 uint32 kCLDTableBuildDate; // yyyymmdd
46 const char* kRecognizedLangScripts; // Character string of lang-Scripts
47 // recognized: "en-Latn az-Arab ..."
48 // Single space delimiter, Random order
49 } CLD2TableSummary;
51 } // End namespace CLD2
53 #endif // I18N_ENCODINGS_CLD2_INTERNAL_CLD2TABLESUMMARY_H_