OXIESEC PANEL
- Current Dir:
/
/
opt
/
golang
/
1.19.4
/
src
/
vendor
/
golang.org
/
x
/
text
/
unicode
/
norm
Server IP: 191.96.63.230
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
12/01/2022 06:13:56 PM
rwxr-xr-x
📄
composition.go
14.11 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
forminfo.go
8.7 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
input.go
2.02 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
iter.go
11.02 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
normalize.go
14.88 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
readwriter.go
2.89 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
tables10.0.0.go
374.31 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
tables11.0.0.go
376.19 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
tables12.0.0.go
376.8 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
tables13.0.0.go
378.62 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
tables9.0.0.go
372.5 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
transform.go
2.37 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
trie.go
1.21 KB
12/01/2022 06:13:01 PM
rw-r--r--
Editing: trie.go
Close
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package norm type valueRange struct { value uint16 // header: value:stride lo, hi byte // header: lo:n } type sparseBlocks struct { values []valueRange offset []uint16 } var nfcSparse = sparseBlocks{ values: nfcSparseValues[:], offset: nfcSparseOffset[:], } var nfkcSparse = sparseBlocks{ values: nfkcSparseValues[:], offset: nfkcSparseOffset[:], } var ( nfcData = newNfcTrie(0) nfkcData = newNfkcTrie(0) ) // lookupValue determines the type of block n and looks up the value for b. // For n < t.cutoff, the block is a simple lookup table. Otherwise, the block // is a list of ranges with an accompanying value. Given a matching range r, // the value for b is by r.value + (b - r.lo) * stride. func (t *sparseBlocks) lookup(n uint32, b byte) uint16 { offset := t.offset[n] header := t.values[offset] lo := offset + 1 hi := lo + uint16(header.lo) for lo < hi { m := lo + (hi-lo)/2 r := t.values[m] if r.lo <= b && b <= r.hi { return r.value + uint16(b-r.lo)*header.value } if b < r.lo { hi = m } else { lo = m + 1 } } return 0 }