Debian Codegraph @

internal/decompress/xz.go

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 package decompress
2
3 import (
4 "bytes"
5 "io"
6
7 "github.com/therootcompany/xz"
8 )
9
10 type Xz struct{}
11
12 func (x Xz) Decompress(data []byte) ([]byte, error) {
13 rdr, err := xz.NewReader(bytes.NewReader(data), 0)
14 if err != nil {
15 return nil, err
16 }
17 return io.ReadAll(rdr)
18 }