Solved

Extract chunk of data from Zip file

Posted on 2001-06-20
3
197 Views
Last Modified: 2011-09-20
I am trying to extract a specific number of bytes of data directly from a zip file. I must be able to read(seek) from any point in the file. Does anyone know how to do this?
Thanks.
0
Comment
Question by:BuzzKnuckles
3 Comments
 
LVL 6

Expert Comment

by:andyclap
ID: 6210999
It's not too difficult in VB -
here's some code to get a byte array from a specific point in a file, should be enough to get you started

dim iFile as integer

'allocate a byte array buffer - 100 bytes
redim abyBuffer(0 to 99) as byte

'open the file
iFile=freefile
open "c:\test.zip" for binary as iFile
'fill the 100 byte buffer from position 555
get #ifile, 555, abyBuffer
'close the file
close iFile

'now do your processing on abyBuffer here...
0
 
LVL 51

Expert Comment

by:Ryan Chong
ID: 6212678
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 150 total points
ID: 7139589
Hi BuzzKnuckles@devx,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Split points between: andyclap and ryancys
*** BuzzKnuckles@devx might have wanted the raw zip data or the unzipped data, so both answers are right!

BuzzKnuckles@devx, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question