matchlen_amd64.go 340 B

123456789101112131415
  1. //go:build amd64 && !appengine && !noasm && gc
  2. // Copyright 2019+ Klaus Post. All rights reserved.
  3. // License information can be found in the LICENSE file.
  4. package zstd
  5. // matchLen returns how many bytes match in a and b
  6. //
  7. // It assumes that:
  8. //
  9. // len(a) <= len(b) and len(a) > 0
  10. //
  11. //go:noescape
  12. func matchLen(a []byte, b []byte) int