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: long.go
    path of file: ./repos/fq/format/avro/decoders
    
    the code of the file until where you have to start completion: package decoders

import (
	"github.com/wader/fq/pkg/d
    
func VarZigZag(d *decode.D) int64 {
	var value uint64
	var shift uint
	size := 0
	for d.NotEnd() && size < 8 {
		size++
		b := byte(d.U8())
		value |= uint64(b&intMask) << shift
		if b&intFlag == 0 {
			return int64(value>>1) ^ -int64(value&1)
		}
		shift += 7
	}
	if size >= 8 {
		d.Fatalf("long exceeds 8 bytes")
	}
	d.Fatalf("unexpected end of data")
	return 0
}