encoder_dict.go 629 B

12345678910111213141516171819202122
  1. package brotli
  2. /* Dictionary data (words and transforms) for 1 possible context */
  3. type encoderDictionary struct {
  4. words *dictionary
  5. cutoffTransformsCount uint32
  6. cutoffTransforms uint64
  7. hash_table []uint16
  8. buckets []uint16
  9. dict_words []dictWord
  10. }
  11. func initEncoderDictionary(dict *encoderDictionary) {
  12. dict.words = getDictionary()
  13. dict.hash_table = kStaticDictionaryHash[:]
  14. dict.buckets = kStaticDictionaryBuckets[:]
  15. dict.dict_words = kStaticDictionaryWords[:]
  16. dict.cutoffTransformsCount = kCutoffTransformsCount
  17. dict.cutoffTransforms = kCutoffTransforms
  18. }