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

Fix XZed binaries similar to bzip2ed binaries #119

Merged
merged 1 commit into from
Dec 5, 2021

Conversation

korpa
Copy link
Collaborator

@korpa korpa commented Dec 5, 2021

Fix XZed binaries similar to bzip2ed binaries.

Similar to #117

@marcosnils
Copy link
Owner

hey @korpa , how did you test this? Not sure if this is required for xz since XZ is different that bz2 in the sense that xz does suppor file listing.

@korpa
Copy link
Collaborator Author

korpa commented Dec 5, 2021

I haven't tested it in real, but my assumption was that it works similar to bzip2 because I did following in a shell:

$ touch test-xz.txt
$ xz test-xz.txt
$ ls test-xz.txt.xz
test-xz.txt.xz
$ unxz test-xz.txt.xz
$ ls test-xz.txt
test-xz.txt

@marcosnils
Copy link
Owner

I haven't tested it in real, but my assumption was that it works similar to bzip2 because I did following in a shell:

Hmmm.. intersting.. I see that xz(1) has an option -l to list information about files that bzip2 doesn't have. So I thought it could be holding metadata about files but that doesn't seem to be the case.

@marcosnils marcosnils merged commit fab888d into marcosnils:master Dec 5, 2021
@korpa
Copy link
Collaborator Author

korpa commented Dec 5, 2021

Now I was unsure if xz may be used like bzip2 on the one hand and like zip on the other hand. But checking https://www.kernel.org I say, that the use tar.xz for the kernel (https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.6.tar.xz).

Furthermore I check the help of xz:

-l, --list          list information about .xz files
$ xz -l test-xz.txt.xz
Strms  Blocks   Compressed Uncompressed  Ratio  Check   Filename
    1       0         32 B          0 B    ---  CRC64   test-xz.txt.xz

It really only lists compression infos. So I think my fix is right. But never the less, it would be good to have real world example to test.

Thanks that you already merged it.

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