Thank you for your efforts. I tried extract archive on default version 16, installed on Debian, but got error:
$ 7z l 8F2DB7.7z
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i3-4005U CPU @ 1.70GHz (40651),ASM,AES-NI)
Scanning the drive for archives:
1 file, 14996041 bytes (15 MiB)
Listing archive: 8F2DB7.7z
--
Path = 8F2DB7.7z
Open WARNING: Can not open the file as [7z] archive
Type = lzma
Date Time Attr Size Compressed Name
..... 1792 8F2DB7
1792 14996041 1 files
Warnings: 1
$ 7z x 8F2DB7.7z
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i3-4005U CPU @ 1.70GHz (40651),ASM,AES-NI)
Scanning the drive for archives:
1 file, 14996041 bytes (15 MiB)
Extracting archive: 8F2DB7.7z
WARNING:
8F2DB7.7z
Can not open the file as [7z] archive
The file is open as [lzma] archive
--
Path = 8F2DB7.7z
Open WARNING: Can not open the file as [7z] archive
Type = lzma
ERROR: There are some data after the end of the payload data : 8F2DB7
Sub items Errors: 1
Archives with Errors: 1
Sub items Errors: 1
Then I downloaded the latest command line version and tried, also error:
~/7z2407-linux-x64$ ./7zz l 8F2DB7.7z -slt
7-Zip (z) 24.07 (x64) : Copyright (c) 1999-2024 Igor Pavlov : 2024-06-19
64-bit locale=en_US.UTF-8 Threads:4 OPEN_MAX:1024, ASM
Scanning the drive for archives:
1 file, 14996041 bytes (15 MiB)
Listing archive: 8F2DB7.7z
--
Path = 8F2DB7.7z
Open WARNING: Cannot open the file as [7z] archive
Type = lzma
Method = LZMA:25:lc1:lp3:pb4
----------
Size = 1792
Packed Size =
Method = LZMA:25:lc1:lp3:pb4
Warnings: 1
~/7z2407-linux-x64$ ./7zzs l 8F2DB7.7z -slt
7-Zip (z) 24.07 (x64) : Copyright (c) 1999-2024 Igor Pavlov : 2024-06-19
64-bit locale=en_US.UTF-8 Threads:4 OPEN_MAX:1024, ASM
Scanning the drive for archives:
1 file, 14996041 bytes (15 MiB)
Listing archive: 8F2DB7.7z
--
Path = 8F2DB7.7z
Open WARNING: Cannot open the file as [7z] archive
Type = lzma
Method = LZMA:25:lc1:lp3:pb4
Size = 1792
Packed Size =
Method = LZMA:25:lc1:lp3:pb4
Warnings: 1
Can you advice how to solve this?
It's not 7z archive.
It's lzma archive and some data after lzma archive.
try
and look extracted files.
yes, I assumed that, there is no 7z signature in 8F2DB7.7z when open it in hex editor.
Extraction gives 2 files,
1.lzma
- 1,8 KiB completely empty file, and2
- 14,3 MiB data fileThank you.
Hm, I tried to decompress another file marked as 7z archive, and it fails.
binwalk says:
Probably it's lzma with modified header: 5 bytes instead of 13 bytes.
where 64-bit uncompressed size field was removed.
So you need some program that can extract it, or add 64-bit size field and extract it with lzma or 7-zip.
Last edit: Igor Pavlov 2024-07-06
In which place to add 8 zero bytes? I can't find in hex editor strings 'lzma' and bytes 6C 7A 6D 61
maybe
0xffffffffffffffff
is ok forUncompressed size
un that file.You mean this way? I've added 8 bytes in the beginning at offset 0000005D.
File format not recognized
5d
is not offset.look description above:
0xffffffffffffffff
at offset 5.Igor,
The hex editor shows the offset number Offset: 0x5. Btw, if count bytes from the left, start from "5D" it turns out to be the sixth byte? Why?
5D 00 00 80 00 00
I was able to decompress it use
7z x 656-2.7z
command:7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i3-4005U CPU @ 1.70GHz (40651),ASM,AES-NI)
Scanning the drive for archives:
1 file, 1421070 bytes (1388 KiB)
Extracting archive: 656-2.7z
WARNING:
656-2.7z
Can not open the file as [7z] archive
The file is open as [lzma] archive
--
Path = 656-2.7z
Open WARNING: Can not open the file as [7z] archive
Type = lzma
ERROR: Unexpected end of data : 656-2
Sub items Errors: 1
Archives with Errors: 1
lzma -d 656-2.7z
lzma: 656-2.7z: Filename has an unknown suffix, skipping (the same with .xz, too)
unlzma: 656-2.xz
: Unexpected end of inputWork also via right click > extract here default Debian Xarchiver (although with error message)
The program that must extract that file knows uncompressed size from another source. So the removed uncompressed size field from the header (5 bytes header instead of original 13 bytes header).
Last edit: Igor Pavlov 2024-07-07
That is, it was a file with a truncated (nonstandard) lzma header, with a missing uncompressed file size field. And since we didn't know the uncompressed file sizes initially, we padded this field with 8 empty bytes. And the proper lzma header should include
38 50 6B 00 00 00 00 00
uncompressed size field, in that case it decompresses normally.