github.com/andybalholm/brotli@v1.0.6/symbol_list.go (about)

     1  package brotli
     2  
     3  /* Copyright 2013 Google Inc. All Rights Reserved.
     4  
     5     Distributed under MIT license.
     6     See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
     7  */
     8  
     9  /* Utilities for building Huffman decoding tables. */
    10  
    11  type symbolList struct {
    12  	storage []uint16
    13  	offset  int
    14  }
    15  
    16  func symbolListGet(sl symbolList, i int) uint16 {
    17  	return sl.storage[i+sl.offset]
    18  }
    19  
    20  func symbolListPut(sl symbolList, i int, val uint16) {
    21  	sl.storage[i+sl.offset] = val
    22  }