Click here to Skip to main content
15,889,034 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hey guys,

i have been making programming languages for a while as you might know from previous questions and i have started to make some pretty advanced programming languages. i was wondering if it is possible for me to make my own 'zip' file. i want to be able to get maybe three .txt files lets say and make a program that compresses them into one file. also with another program, i am able to access the data of each individual file by name. i want to create a programming language similar to java and have been thinking about it. if i make every different file a class and the name of the file being the class name, then i am able to easily look at each individual file and it's data. but if i were to do this, then i would have like 5 files and if i were to use a zip file, then it means that i would have to get another library or something that lets me access the contents of zip files.

i do know what i am getting myself into and i do understand that this code can be very complex, but please don't tell me that, i already know. so if you do have an idea of how to do this, then can you please put down some sample code and explain it?

thanks
Posted
Comments
Sergey Alexandrovich Kryukov 7-Dec-12 22:48pm    
Just the opposite: your plans are so ambitious that such a simple problem as a compression algorithm without any special requirements should look like a snap for you; I don't even understand why are you asking for help...
--SA
Member 8378691 8-Dec-12 0:15am    
i am asking for help because i don't know how to do this...
Sergey Alexandrovich Kryukov 8-Dec-12 0:26am    
Some help has arrived, didn't you noticed it? :-)
--SA
Member 8378691 8-Dec-12 1:34am    
yes i did, but this has not helped me at all. you don't get what i am trying to say. i don't want to make a zip file, i want to make my own file type completely that acts like a zip file. with one program, it compiles multiple files into it and with another i am able to look inside of it and access data from each individual file that has been compiled into it.
Sergey Alexandrovich Kryukov 8-Dec-12 23:36pm    
You cannot get help. If you want to make your own file type, and then someone help you, what you get is not "your own" anymore. Got it? So, I found it appropriate to show you how someone else make his own file type and made is successful.

I hope this hint can help you.

--SA

1 solution

You will find more then enough code samples if you start from here: http://en.wikipedia.org/wiki/Data_compression[^].

Want to see really successful code? Please see:
http://en.wikipedia.org/wiki/7-Zip[^],
http://www.7-zip.org/[^].

Open code, by the way, and a lot of useful information on the 7zip Web site.

Good luck,
—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900