LZMA2 reader issue
sigil66 opened this issue · 7 comments
I am having trouble decoding a file.
I reproduced the issue with gxz after encountering it with my test case.
The error is:
lzma: Reader2 doesn't get data
Line 149 in 25c16dc
I have attached the file that produces the issue.
gxz
gxz -d
gxz lzma: Reader2 doesn't get data
xz -d appears to decode properly so this would seem to point to a problem in reader2.
Will follow up with more info or a fix.
The offending file:
https://www.dropbox.com/s/gmoyva5lx5k96vs/utils.LegacyBloomFilter.bin?dl=0
~/Go/bin/gxz -v 3 -F xz -d utils.LegacyBloomFilter.bin.xz
gxz: xz header CRC-64
gxz: block filter LZMA dict cap 0x800000
gxz: chunk header LRND 2097151 5214 LC 3 LP 0 PB 2
gxz: chunk header L 2097151 3960 LC 0 LP 0 PB 0
gxz: lzma: Reader2 doesn't get data
xz -l -vv utils.LegacyBloomFilter.bin.xz
utils.LegacyBloomFilter.bin.xz (1/1)
Streams: 1
Blocks: 1
Compressed size: 10.4 KiB (10,640 B)
Uncompressed size: 4,883.0 KiB (5,000,170 B)
Ratio: 0.002
Check: CRC64
Stream padding: 0 B
Streams:
Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding
1 1 0 0 10,640 5,000,170 0.002 CRC64 0
Blocks:
Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check CheckVal Header Flags CompSize MemUsage Filters
1 1 12 0 10,604 5,000,170 0.002 CRC64 5db2f7fad075c6a7 12 -- 10,584 9 MiB --lzma2=dict=8MiB
Memory needed: 9 MiB
Sizes in headers: No
Minimum XZ Utils version: 5.0.0
Problem looks to be here: https://github.com/ulikunitz/xz/blob/dev/lzma/reader2.go#L131
If read is on a byte boundary EOF is never hit.
Testing the fix ...
131-134 I don't believe are required.
Thank you for the report and for the file. I will work on it today evening.
Confirmed fix!
Cheers!
I have released version 0.4.1 in master. The fix is also included in the dev branch.
So far I am a huge fan of the dev branch, the files it produces are 30-40% smaller in my test cases :)