[yunqa.de] Re: Read/Write compressed streams

  • From: Rolf Lampa <rolf.lampa@xxxxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Sat, 05 Jul 2008 12:38:09 +0200



Delphi Inspiration skrev:
Rolf Lampa wrote: 
Ops, I don't have any BZip2 Delphi implementation (at first I thought that was supported in the DIUcl or DIZip libraries). 
Both libraries (as their names suggest) do not handle the BZip2 compression format. DIUcl ports UCL to Delphi and implements ...

Yes, now when I for the first time have looked into compression, and bzip2 in particular, I realize what all the abbreviations stand for! :)  And this morning I also found www.bzip.org, and I also downloaded a c++ compiler and just an hour ago I compiled the latest bzip2 version (1.0.5 if I'm not mistaken). 

Since I'm not very technically skilled all this was a bit of a challenge... first I had to figure out what was missing, and then find a way to fix it. However, I did it! =)

TStream support is not needed if you want to work with the xmlParserInputBuffer code I posted in one of my previous messages. It solely relies an an open file handle and the native BZip2 API compression interface. 
Yes, now when I got all pieces in place (in my head) I can understand better how it's all put together. For the moment, however, I must use my handcrafted xml stream-buff-reader (although I now try out your UnicodeReader feeding a TFileStream based BzDecompressor reader which I found. But I will also try to modify my app to use your xml reader (but not today).


Where can I find a bz2 implementation for Delphi? Is that something which you can provide?

I have uploaded my Delphi implementation based on the latest BZip2 sources here (no warranties whatsoever):

  http://www.yunqa.de/delphi/downloads/DIBZip2Api.zip

Yes, thank you for this, I now even have the latest .obj files, so now I should be able to make the xml reader work too.

Regards,

// Rolf Lampa

_______________________________________________ Delphi Inspiration mailing list yunqa@xxxxxxxxxxxxx //www.freelists.org/list/yunqa

Other related posts: