Skip to content

Add support for .lz and .lz4 compression algorithms#177

Open
yh-sb wants to merge 1 commit intoip7z:mainfrom
yh-sb:main
Open

Add support for .lz and .lz4 compression algorithms#177
yh-sb wants to merge 1 commit intoip7z:mainfrom
yh-sb:main

Conversation

@yh-sb
Copy link
Copy Markdown

@yh-sb yh-sb commented Dec 24, 2025

Added read-only support for lzip (.lz) and LZ4 (.lz4) compressed archives.

Here are files examples: archive.tar.lz, archive.tar.lz4

$ 7zz l ./archive.tar.lz

7-Zip (z) 25.01 (arm64) : Copyright (c) 1999-2025 Igor Pavlov : 2025-08-03
 64-bit arm_v:8-A locale=en_US.UTF-8 Threads:14 OPEN_MAX:1048575

Scanning the drive for archives:
1 file, 575105 bytes (562 KiB)

Listing archive: ./archive.tar.lz

--
Path = ./archive.tar.lz
Type = lzip

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
                    .....                            archive.tar
------------------- ----- ------------ ------------  ------------------------
                                             575105  1 files
$ 7zz l ./archive.tar.lz4

7-Zip (z) 25.01 (arm64) : Copyright (c) 1999-2025 Igor Pavlov : 2025-08-03
 64-bit arm_v:8-A locale=en_US.UTF-8 Threads:14 OPEN_MAX:1048575

Scanning the drive for archives:
1 file, 580099 bytes (567 KiB)

Listing archive: ./archive.tar.lz4

--
Path = ./archive.tar.lz4
Type = lz4

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
                    .....                            archive.tar
------------------- ----- ------------ ------------  ------------------------
                                             580099  1 files

@yh-sb yh-sb changed the title feat: add support for .lz and .lz4 compression algorithms Add support for .lz and .lz4 compression algorithms Dec 24, 2025
@yh-sb
Copy link
Copy Markdown
Author

yh-sb commented Jan 9, 2026

Hi @ip7z,
Would you mind taking a look at this?

Copy link
Copy Markdown

@gyurix gyurix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usefulness is high. Implementation is not ready yet.

LZ4 handler currently ignores header/block/content checksums and does not reject BlockIndependence == 0, even though dependent blocks need previous-block history. That can silently produce wrong output on valid frames.

Lzip handler is similarly partial: trailer CRC/member-size are not validated and concatenated members are ignored, so advertised .lz support is broader than actual implementation.

Merge readiness: 2/10. Before merge: validate required frame/trailer fields, reject unsupported features explicitly, and add corpus/tests for dependent blocks, concatenated members, and malformed inputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants