Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to compress with lz4 ? #206

Closed
kramer04 opened this issue Dec 13, 2022 · 7 comments
Closed

[Question] How to compress with lz4 ? #206

kramer04 opened this issue Dec 13, 2022 · 7 comments

Comments

@kramer04
Copy link

Using 7zz the file isn't compressed

$ 7zz a -tlz4 -mx9 boot_test.img.lz4 boot.img

7-Zip (z) 22.00 ZS v1.5.2 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-06-15
 64-bit locale=fr_FR.UTF-8 Threads:8

Scanning the drive:
1 file, 34906656 bytes (34 MiB)

Creating archive: boot_test.img.lz4

Add new data to archive: 1 file, 34906656 bytes (34 MiB)

               
Files read from disk: 1
Archive size: 35655086 bytes (35 MiB)
Everything is Ok

Using LZ4

$ lz4 -B6 --content-size boot.img boot_test.img.lz4
using blocks of size 1024 KB 
Compressed 34906656 bytes into 17656861 bytes ==> 50.58%      
@teoberi
Copy link

teoberi commented Dec 15, 2022

@kramer04
Copy link
Author

I saw Usage
but if i want a .lz4 file it doesn't works. It's only to compress with .7z file.

$ 7zz a boot_test.img.lz4 boot.img -mx9 -m0=lz4

7-Zip (z) 22.00 ZS v1.5.2 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-06-15
 64-bit locale=fr_FR.UTF-8 Threads:8

Open archive: boot_test.img.lz4
ERROR: boot_test.img.lz4
Cannot open the file as archive



System ERROR:
E_INVALIDARG : One or more arguments are invalid

@teoberi
Copy link

teoberi commented Dec 15, 2022

That's all for now!
As long as the development of p7zip stagnates and there are other forks but nothing unified, I stay with the original 7-zip for Linux.

@tansy
Copy link
Contributor

tansy commented Dec 23, 2022

Are toy sure it has lz4 compiled in or as a standalone codec?

It should be specified in $ 7z i. Under formats and codecs.

@jinfeihan57
Copy link
Contributor

This seems to be a bug.Can you try the old version p7zip 17.04?

@jinfeihan57
Copy link
Contributor

jinfeihan57 commented Dec 30, 2022

@kramer04 I fixed this BUG, you can try it.

@kramer04
Copy link
Author

kramer04 commented Jan 4, 2023

@jinfeihan57 Thanks bug fixed

$ 7zz a -tlz4 -mx1 boot_test.img.lz4 boot.img

7-Zip (z) 22.00 ZS v1.5.2 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-06-15
 64-bit locale=fr_FR.UTF-8 Threads:8

Scanning the drive:
1 file, 34906656 bytes (34 MiB)

Creating archive: boot_test.img.lz4

Add new data to archive: 1 file, 34906656 bytes (34 MiB)

               
Files read from disk: 1
Archive size: 17650357 bytes (17 MiB)
Everything is Ok

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

No branches or pull requests

4 participants