Archived Forum Post

Index of archived forum posts

Question:

Read large bz2-Archive 3 GB in a stream in to VB6

Jul 23 '13 at 17:37

Hello, my Problem:

3 GB large Gzip2 archive

I Want:

Read the Archive in a stream in to VB6.

Tried: Dim D(1024) as Byte Dim chi As New ChilkatCompression isUnlocked = chi.UnlockComponent("AnythingWorksFor30DayTrial") chi.Algorithm = "bzip2" Call ReadFile(Fosm&, D(0), UBound(D), SizeRead&, 0&) AA = chi.BeginDecompressBytes(D)

Result: Ubound(AA) is -1 ChilkatLog: BeginDecompressBytes: DllDate: Jul 10 2013 ChilkatVersion: 9.4.1.26 UnlockPrefix: AnythingWorksFor30DayTrial Username: PCAXEL:R998304 Architecture: Little Endian; 32-bit Language: Visual C++ 9.0 VerboseLogging: 0 hcCurDate: Mon, 22 Jul 2013 16:02:59 +0200 hcExpire: 11/2013 InSize: 1025 Success. --BeginDecompressBytes --ChilkatLog

Is it possible to do what I want ?

Best regards, Axel


Answer

The Chilkat.Compression API (CkCompression in C++, or ChilkatCompression in VB6) operates directly on raw compressed data without any file format. A Gzip (.gz) or Bzip2 (.bz2) file is a specific file format, with a header and such, and the raw compressed data is contained within the confines of the file format. You would need to use the Chilkat.Gzip or Chilkat.Bz2 API's for the .gz and .bz2 file formats, but unfortunately these do not have the ability to read in chunks.