code: func emitCopy(dst []byte, offset, length int) int {
  	i := 0
  	for length > 0 {
  		x := length - 4
  		if 0 <= x && x < 1<<3 && offset < 1<<11 {
  			dst[i+0] = uint8(offset>>8)&0x07<<5 | uint8(x)<<2 | tagCopy1
  			dst[i+1] = uint8(offset)
  			i += 2
  			break
  		}
  
  		x = length
  		if x > 1<<6 {
  			x = 1 << 6
  		}
  		dst[i+0] = uint8(x-1)<<2 | tagCopy2
  		dst[i+1] = uint8(offset)
  		dst[i+2] = uint8(offset >> 8)
  		i += 3
  		length -= x
  	}
  	return i
  }
docs: // emitCopy writes a copy chunk and returns the number of bytes written.