Solved

Extract chunk of data from Zip file

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

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now