[sword-devel] Zipfile module downloads

DM Smith dmsmith555 at yahoo.com
Thu Sep 20 15:59:08 MST 2007


Troy,
	I studied the untargz code and all the other code in the zlib  
directory. It does not apply to zip files. A zipfile has a table of  
contents and the zlib code does not read it. An entry in the TOC will  
have the location of the file and it's size in the zipfile and how it  
is stored. (Typically, images are stored uncompressed.) IIRC, the TOC  
also has CRC info. I'm looking for code that reads the TOC. I have  
found some, but I'm wondering if anyone else has seen something that  
they can recommend.

	The zlib code essentially reads a byte stream and uncompresses it.  
There is also code present to untar a stream.
DM

On Sep 20, 2007, at 6:21 PM, Troy A. Griffitts wrote:

> There is already code to unpack the mods.d.tar.gz file.  I believe  
> the code
> we used for that came from the zlib project.  It may be similar to  
> what you
> need to do for a zip file.  I can't remember offhand.
>
>
> DM Smith <dmsmith555 at yahoo.com> wrote:
>> I'm looking into adding to installmgr the download of a cached zipped
>> module, if present at the download site. Otherwise the code will  
>> work as
>> before.
>>
>> I've run into an obstacle: zlib cannot read the "table of  
>> contents" in a
>> zipfile. I'm looking for a portable way to do the unzip. Any  
>> suggestions?
>>
>> Many thanks,
>>    DM
>>
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>>
>>
>
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list