Solved

Extract chunk of data from Zip file

Posted on 2001-06-20
3
192 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 50

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

856 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