Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 25e050d

Browse files
committed
add a comment explaining backwards compatibility
1 parent b736c51 commit 25e050d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lz4.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ type Lz4 struct {
1616
// Compress reads in, compresses it, and writes it to out.
1717
func (lz *Lz4) Compress(in io.Reader, out io.Writer) error {
1818
w := lz4.NewWriter(out)
19+
// TODO archiver v4: use proper lz4.Fast
20+
// bitshifting for backwards compatibility with lz4/v3
1921
options := []lz4.Option{
2022
lz4.CompressionLevelOption(lz4.CompressionLevel(1 << (8 + lz.CompressionLevel))),
2123
}

tarlz4.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ func (tlz4 *TarLz4) wrapWriter() {
8484
var lz4w *lz4.Writer
8585
tlz4.Tar.writerWrapFn = func(w io.Writer) (io.Writer, error) {
8686
lz4w = lz4.NewWriter(w)
87+
// TODO archiver v4: use proper lz4.Fast
88+
// bitshifting for backwards compatibility with lz4/v3
8789
options := []lz4.Option{
8890
lz4.CompressionLevelOption(lz4.CompressionLevel(1 << (8 + tlz4.CompressionLevel))),
8991
}

0 commit comments

Comments
 (0)