func newBuffer(size int) *buffer {
	return &buffer{data: make([]byte, size+1)}
}
newBuffer creates a buffer with the given size.
package lzma
import (
	"errors"
)
type buffer struct {
	data  []byte
	front int
	rear  int
}