Re: A few questions

by (Login MCalkins)
Moderator

 

First of all, that was just an example of concept...

>Could the program edit the files once they are in the archive?

You could do that. It might be easier to extract the files, edit them, then re-archive them.

>Can you archive folders also?

You could do that. The more features you add, the more coding it would take.

>And, am I able to open the files that same way as before. Like could I do something simple like this the same way:
>OPEN "archive.tmp/user/program/uses.txt" FOR INPUT AS #1

Using the method I demonstrated: No. If you wanted to "open" the file without extracting it first, you would basically have to write your own file i/o functions to work within your archive format.

Windows has built in partial support for .zip files, but I don't know if it allows you to open them in a way similar to that.

I don't know if you are the kind of person who likes to reinvent the wheel, or if you would rather use existing code. If you want to try reimplementing the .zip format, there are links to different versions of the specifications in the External Links section of the Wikipedia page:

http://en.wikipedia.org/wiki/ZIP_%28file_format%29

If you would rather use existing code, you could probably use the .DLLs that are part of the open source 7-Zip program. 7-Zip supports both 7z and zip, and also AES encryption. 7-Zip is licensed as LGPL.

http://7-zip.org/

They have a public domain SDK, but it seems to be only a subset of that functionality:

http://7-zip.org/sdk.html

Also, be advised that the Windows API provides cryptographic functions, but I don't know how suitable they are.

http://msdn.microsoft.com/en-us/library/aa380255%28v=VS.85%29.aspx

Also, this might be suitable for AES and/or SHA:

http://en.wikipedia.org/wiki/PolarSSL

Regards,
Michael

Posted on May 23, 2011, 6:48 PM

Respond to this message   

Return to Index

Response TitleAuthor and Date
more... on May 23

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement