This question has already been asked in one form or another but the problem still exists at least for me.
I have been working with some of the largest dump files recently e.g. stackoverflow.com-Posts.7z
which is 9,598,631 KB compressed.
I need to parse the data and due to the lack of proper LZMA stream based API in .NET, I am forced to first extract this to get a ~48 GB XML file which I then stream over to get the stuff I want. This results in unnecessary time and storage wasted when dealing with larger dumps.
I therefore propose using BZIP2 which results in slightly less size of 9,598,624 KB but on the more productive side, I can then use a library such as DotNetZip to decompress the file as a stream resulting in not having to extract the file first before getting my hands on the data.
Just for reference, PPMD consistently gives better compression (for textual data) at the cost of much slowness but then again it has the same problem of LZMA for not having a stream based API in .NET at least not a free/OSS one.
BZIP2
, in fact I used the7Zip SDK
to decompress the file asLZMA
but it's not ideal as you would need to extract the whole file (not streamed base) and I don't want to have to do gymnastics to makeLZMA
work in .NET when we can hopefully get this in a better format that can make both the Stack guys and us the users happy.BZIP2
is already less (by a very small margin) than the currentLZMA
howeverBZIP2
has a much better support from the API point of view at least in .NET.BZIP2
stored in a7z
format which introduces additional headers at the beginning of the file. I just cannot figure out why it would decompress usingLZMA
without any errors!. All I need to do now is to ignore the headers and decompress the rest. Thanks for that. Feel free to post this as an answer and I will mark as accepted.