mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-12-14 23:41:58 +01:00
23 lines
629 B
Go
23 lines
629 B
Go
|
package brotli
|
||
|
|
||
|
/* Dictionary data (words and transforms) for 1 possible context */
|
||
|
type encoderDictionary struct {
|
||
|
words *dictionary
|
||
|
cutoffTransformsCount uint32
|
||
|
cutoffTransforms uint64
|
||
|
hash_table []uint16
|
||
|
buckets []uint16
|
||
|
dict_words []dictWord
|
||
|
}
|
||
|
|
||
|
func initEncoderDictionary(dict *encoderDictionary) {
|
||
|
dict.words = getDictionary()
|
||
|
|
||
|
dict.hash_table = kStaticDictionaryHash[:]
|
||
|
dict.buckets = kStaticDictionaryBuckets[:]
|
||
|
dict.dict_words = kStaticDictionaryWords[:]
|
||
|
|
||
|
dict.cutoffTransformsCount = kCutoffTransformsCount
|
||
|
dict.cutoffTransforms = kCutoffTransforms
|
||
|
}
|