From 656c74b883fcc31629ff5526ca6eb8bdba84b27b Mon Sep 17 00:00:00 2001 From: Seednode Date: Mon, 8 Jan 2024 17:42:13 -0600 Subject: [PATCH] Change lzw from LSB-first to MSB-first. This should probably be a major version bump, but who's using lzw, really --- cmd/index.go | 4 ++-- cmd/root.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/index.go b/cmd/index.go index ddd72c3..8e409d7 100644 --- a/cmd/index.go +++ b/cmd/index.go @@ -113,7 +113,7 @@ func getReader(format string, file io.Reader) (io.Reader, error) { case "lz4": return lz4.NewReader(file), nil case "lzw": - return lzw.NewReader(file, lzw.LSB, 8), nil + return lzw.NewReader(file, lzw.MSB, 8), nil case "none": return io.NopCloser(file), nil case "snappy": @@ -156,7 +156,7 @@ func getWriter(format string, file io.WriteCloser) (io.WriteCloser, error) { return encoder, nil case format == "lzw": - return lzw.NewWriter(file, lzw.LSB, 8), nil + return lzw.NewWriter(file, lzw.MSB, 8), nil case format == "none": return file, nil case format == "snappy": diff --git a/cmd/root.go b/cmd/root.go index b132323..9efcb31 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -17,7 +17,7 @@ import ( const ( AllowedCharacters string = `^[A-z0-9.\-_]+$` - ReleaseVersion string = "4.0.5" + ReleaseVersion string = "4.1.0" ) var (