[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Extract chunk of data from Zip file

Posted on 2001-06-20
3
Medium Priority
?
223 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 54

Expert Comment

by:Ryan Chong
ID: 6212678
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 450 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

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…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

873 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