nwaples / rardecode

A go package for reading RAR archives.
BSD 2-Clause "Simplified" License
124 stars 28 forks source link

Error unpacking large archive writing file: rardecode: ... #17

Closed Galamoon closed 7 years ago

Galamoon commented 7 years ago

I have problems with unpacking a large rar archive, the archive itself takes about 6GB and unpacked 25GB. The archive contains XML files with a database of Russian addresses. You can download it from the official site http://fias.nalog.ru or from the direct link http://fias.nalog.ru/Public/Downloads/Actual/fias_xml.rar The full error text ERROR: 2017/10/12 00:37:10 unpack.go:12: Error unpack archive: data\AS_HOUSE_20171008_bed24a8e-4646-448d-acb8-8de765818389.XML: writing file: rardecode: decoder expected more data than is in packed file I'm new to Go, you can tell me what the problem is.

nwaples commented 7 years ago

Well if it works with normal rar/unrar then its a problem with my library. I can have a look at it, but it might take a little while since its a large file.

Galamoon commented 7 years ago

Okay, I will be waiting. I wonder what the problem is, I was thinking here on my laptop 16GB RAM and the file it's 20GB maybe when unpacking the data is not immediately discarded on the disk but accumulated in the operative memory

nwaples commented 7 years ago

Sorry for the delay. It looks to be a bug that I had already fixed in the experimental branch. I've merged it back into the main branch. That seems to have fixed it in my testing.