You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: zeroprefix.go
    path of file: ./repos/restic/internal/restic
    
    the code of the file until where you have to start completion: package restic

import "bytes"

// ZeroPrefixLen returns the length of the longest all-zero prefix of p.
func ZeroPrefixLen(p []byte) (n int) {
	// First skip 1kB-sized blocks, for speed.
	var zeros [1024]byte

	for len(p) >= len(zeros) && bytes.Equal(p[:len(zeros)],
    
func ZeroPrefixLen(p []byte) (n int) {
	// First skip 1kB-sized blocks, for speed.
	var zeros [1024]byte

	for len(p) >= len(zeros) && bytes.Equal(p[:len(zeros)], zeros[:]) {
		p = p[len(zeros):]
		n += len(zeros)
	}

	for len(p) > 0 && p[0] == 0 {
		p = p[1:]
		n++
	}

	return n
}