Files
squashfs/internal/decompress/lzo.go
T
Anders F Björklund 04d914d403 Allow disabling lzo and lzma
By setting the buildtags "no_lzo" and/or "no_lzma",
one can drop the library dependency on lzo and lzma.

The same could be done for xz as well, but there are
still lots of archives using xz compression out there.
2025-03-16 13:56:04 +01:00

15 lines
226 B
Go

//go:build !no_lzo
package decompress
import (
"bytes"
"github.com/rasky/go-lzo"
)
type Lzo struct{}
func (l Lzo) Decompress(data []byte) ([]byte, error) {
return lzo.Decompress1X(bytes.NewReader(data), len(data), 0)
}