torels Posted March 18, 2009 Share Posted March 18, 2009 Hi thereI have a few questions on how to read, modify ect a zip file's header (after the PK and 18 nul chars)Here is some reference:http://www.pkware.com/documents/casestudies/APPNOTE.TXThttp://www.ta7.de/txt/computer/computer016.htmwhat I basicly need is to learn/understand how to manage the data in the headeri want to be able to delete files (by deleting the actual code in the file) and then modify the size part and the crc23 part of the header so the zip won't result broken thanks in advance Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 19, 2009 Share Posted March 19, 2009 Hi thereI have a few questions on how to read, modify ect a zip file's header (after the PK and 18 nul chars)Here is some reference:http://www.pkware.com/documents/casestudies/APPNOTE.TXThttp://www.ta7.de/txt/computer/computer016.htmwhat I basicly need is to learn/understand how to manage the data in the headeri want to be able to delete files (by deleting the actual code in the file) and then modify the size part and the crc23 part of the header so the zip won't result broken thanks in advanceYou are re-inventing the wheel. There are APIs to work with .zip files without trying to create your own. For example, eltorro's: Zip plugin, A plugin to add zip function to AutoIt V3There is also a .dll interface to 7-zip, etc., etc., ... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
trancexx Posted March 19, 2009 Share Posted March 19, 2009 weaponx had a nice code to read zip files. Link to that....regardless of PsaltyDS's (is this ok?) remark, I think you should go for it. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 20, 2009 Share Posted March 20, 2009 weaponx had a nice code to read zip files. Link to that....regardless of PsaltyDS's (is this ok?) remark, I think you should go for it.The code linked above does not modify the file, which is the tricky part. I believe there would be indexes and checksums elsewhere in the file that would have to updated too, or the file would just be flagged as corrupt by the usual APIs.7-zip is open source. If this is an educational exercise (you want to learn how the other programs do it) then you should look inside that source code for an example of how it was done. In this case, examining other wheels, then re-inventing the wheel is a good thing because you learn so much about wheels in the process.If this is a practical matter (you want to achieve this operation efficiently in an AutoIt script), then re-inventing the wheel is an absurd waste of time, because there are serviceable wheels laying around all over the place. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
trancexx Posted March 20, 2009 Share Posted March 20, 2009 Yes of course. Wheels to learn from. Btw, weaponx covered all available data. There is no more. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
torels Posted March 23, 2009 Author Share Posted March 23, 2009 I know of those APIs, but I wanted to do it in au3 thanks alot trancexx Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now