Move code to different places, add comments here and there, no actual changes

This commit is contained in:
eleksir
2026-03-28 01:38:17 +03:00
parent 15ac3be410
commit 722620945d
16 changed files with 406 additions and 948 deletions

17
internal/backer/xz.go Normal file
View File

@@ -0,0 +1,17 @@
package backer
import (
"context"
"io"
"github.com/ulikunitz/xz"
)
// CreateTarXzStream takes a list of files and returns a reader that reads from an xz-compressed tar archive.
func CreateTarXzStream(ctx context.Context, filepaths []string) io.ReadCloser {
return createArchiveStream(ctx, filepaths, func(w io.Writer) (io.WriteCloser, error) {
return xz.NewWriter(w)
})
}
/* vim: setlocal ft=go noet ai ts=4 sw=4 sts=4: */