1 // generated by go run gen.go; DO NOT EDIT
2 3 package publicsuffix
4 5 import _ "embed"
6 7 const version = "publicsuffix.org's public_suffix_list.dat, git revision 2c960dac3d39ba521eb5db9da192968f5be0aded (2025-03-18T07:22:13Z)"
8 9 const (
10 nodesBits = 40
11 nodesBitsChildren = 10
12 nodesBitsICANN = 1
13 nodesBitsTextOffset = 16
14 nodesBitsTextLength = 6
15 16 childrenBitsWildcard = 1
17 childrenBitsNodeType = 2
18 childrenBitsHi = 14
19 childrenBitsLo = 14
20 )
21 22 const (
23 nodeTypeNormal = 0
24 nodeTypeException = 1
25 nodeTypeParentOnly = 2
26 )
27 28 // numTLD is the number of top level domains.
29 const numTLD = 1454
30 31 // text is the combined text of all labels.
32 //
33 //go:embed data/text
34 var text string
35 36 // nodes is the list of nodes. Each node is represented as a 40-bit integer,
37 // which encodes the node's children, wildcard bit and node type (as an index
38 // into the children array), ICANN bit and text.
39 //
40 // The layout within the node, from MSB to LSB, is:
41 //
42 // [ 7 bits] unused
43 // [10 bits] children index
44 // [ 1 bits] ICANN bit
45 // [16 bits] text index
46 // [ 6 bits] text length
47 //
48 //go:embed data/nodes
49 var nodes uint40String
50 51 // children is the list of nodes' children, the parent's wildcard bit and the
52 // parent's node type. If a node has no children then their children index
53 // will be in the range [0, 6), depending on the wildcard bit and node type.
54 //
55 // The layout within the uint32, from MSB to LSB, is:
56 //
57 // [ 1 bits] unused
58 // [ 1 bits] wildcard bit
59 // [ 2 bits] node type
60 // [14 bits] high nodes index (exclusive) of children
61 // [14 bits] low nodes index (inclusive) of children
62 //
63 //go:embed data/children
64 var children uint32String
65 66 // max children 870 (capacity 1023)
67 // max text offset 31785 (capacity 65535)
68 // max text length 31 (capacity 63)
69 // max hi 10100 (capacity 16383)
70 // max lo 10095 (capacity 16383)
71