SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Working with zip in the middle of the stream

Last post 06-15-2007 3:10 AM by JohnReilly. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-15-2007 1:32 AM

    Working with zip in the middle of the stream

    Hi everybody,

    sorry for probably newbie question, but as i did not found anything like this on forum let me ask it:

    Is it possible to work with zip stored in the middle of the other file (at specified position) using ZipFile class(so i can use findEntry to find files in zip) ?

    without saving zip as tmp file.


    Filed under:
  • 06-15-2007 3:10 AM In reply to

    Re: Working with zip in the middle of the stream

    Hi,

    The ZipFile probably wont handle that but it would be possible to get read access to such a file programmatically.

    The possible bit depends on the size of the file as the ZipFile class tolerates some variation in location due to variable length comments at the end. If the end of the zip file is within 64K bytes of the real end of file it should still work ok for reading.

    The programmatically bit means that you can contruct a file stream like class that can be passed to the ZipFile class to get it to work.  Reading from such a file would be as normal while writing to the file would take a bit more leg work.

    You can find a class in the ZipFile.cs file call PartialInputStream which although it wont do what you want as is could be used as the basis for something that could do the job.

    hth, -jr-

Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.