Solved

Extract chunk of data from Zip file

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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

832 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