matchlen_amd64.go 377 B

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