code: func IsBinary(r io.Reader) (bool, error) {
  	reader := bufio.NewReader(r)
  	c := 0
  	for {
  		if c == sniffLen {
  			break
  		}
  
  		b, err := reader.ReadByte()
  		if err == io.EOF {
  			break
  		}
  		if err != nil {
  			return false, err
  		}
  
  		if b == byte(0) {
  			return true, nil
  		}
  
  		c++
  	}
  
  	return false, nil
  }
docs: // IsBinary detects if data is a binary value based on:
  // http://git.kernel.org/cgit/git/git.git/tree/xdiff-interface.c?id=HEAD#n198