func IsEqual(oldb, newb []byte) (equal bool) {
	oldblen := len(oldb)
	newblen := len(newb)
	minlen := 0
	switch {
	case oldblen < newblen:
		minlen = oldblen
	case oldblen == newblen:
		minlen = oldblen
	default:
		minlen = newblen
	}
	at := 0
	for ; at < minlen; at++ {
		if oldb[at] != newb[at] {
			return
		}
	}
	return oldblen == newblen
}
IsEqual compare two slice of bytes and return true if equal or false
otherwise.
package diff
import (
	"bufio"
	"io"
	"os"
	libbytes "github.com/shuLhan/share/lib/bytes"
	"github.com/shuLhan/share/lib/text"
)
const (
	LevelLines = iota
	LevelWords
)
const (
	DefMatchLen = 5
	DefMatchRatio = 0.7
)
func ReadLines(f string) (lines text.Lines, e error) {
	fd, e := os.Open(f)
	if e != nil {
		return
	}
	reader := bufio.NewReader(fd)
	n := 1
	for {
		line, e := reader.ReadBytes(DefDelimiter)
		if e != nil {
			if e == io.EOF {
				break
			}
			return lines, e
		}
		lines = append(lines, text.Line{N: n, V: line})
		n++
	}
	e = fd.Close()
	return lines, e
}