github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/libraries/klauspost/compress/flate/crc32_noasm.go (about)

     1  //+build !amd64 noasm appengine
     2  
     3  // Copyright 2015, Klaus Post, see LICENSE for details.
     4  
     5  package flate
     6  
     7  func init() {
     8  	useSSE42 = false
     9  }
    10  
    11  // crc32sse should never be called.
    12  func crc32sse(a []byte) hash {
    13  	panic("no assembler")
    14  }
    15  
    16  // crc32sseAll should never be called.
    17  func crc32sseAll(a []byte, dst []hash) {
    18  	panic("no assembler")
    19  }
    20  
    21  // matchLenSSE4 should never be called.
    22  func matchLenSSE4(a, b []byte, max int) int {
    23  	panic("no assembler")
    24  	return 0
    25  }
    26  
    27  // histogram accumulates a histogram of b in h.
    28  // h must be at least 256 entries in length,
    29  // and must be cleared before calling this function.
    30  func histogram(b []byte, h []int32) {
    31  	for _, t := range b {
    32  		h[t]++
    33  	}
    34  }