----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: LovedJohnySmith Message 5 in Discussion Vishal: Please have a look at the following URL, I kindly request you to go through the URL, how you can achive your scenario using SharpLib(free library). http://www.codeproject.com/csharp/remotezip.asp It has RemoteZip class, which contains all the implementation for this technique. The most interesting part is the search for the End of Record of the ZIP archive, because it is at the end of the file but it has a variable length. To access a web resource, we need to use the HttpWebRequest class of the .NET Framework, and the method AddRange hides all the details of using the Range options. When the range has a negative value, it means that the offset is relative to the end. This is an example of the HTTP request required for extracting a file: Request the last 280 bytes of the archive to find the End of Central Directory. >From the End Of Central Directory, obtain the offset and length of the Central Directory; Load the Central Directory with all the entries information. Find the requested file and obtain the offset of its Local Header in the archive; Request a block of data starting at the Local Header and sized as the maximum size of the Local Header plus the compressed size; skip the Local Header part from the requested data. Then, serve the decompressed data as coming from the Web Server. Because the Local Header has a dynamic size, we request 16+64K*2+compressedSize bytes. The 64K*2 is the maximum dimension of the dynamic part of the Local Header, but usually it's a really small value. An alternative could be to download only the static part of the Local Header, then perform another request to obtain the compressed data, but it should be avoided because of the additional overhead of the HTTP request. Thanx, Smith ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
