C++ and ZIP Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lumpybanana247
    New Member
    • Apr 2007
    • 134

    C++ and ZIP Help

    i have a couple questions

    1.how do you create a zip file in c++
    2.how do you create files in the zip in c++

    i know you can create a folder with
    CreateDirectory ("C:\\folder",0 );
    and
    create a file with ofstream

    anyone have an idea?
    thanks
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    Originally posted by lumpybanana247
    i have a couple questions

    1.how do you create a zip file in c++
    2.how do you create files in the zip in c++

    i know you can create a folder with
    CreateDirectory ("C:\\folder",0 );
    and
    create a file with ofstream

    anyone have an idea?
    thanks
    Hi,
    If u want to create a zip file in c++ then search for some libraries which u can integerate in ur code.
    With the libraries ur life wlll be easy
    Raghuram

    Comment

    • archonmagnus
      New Member
      • Jun 2007
      • 113

      #3
      Otherwise, you could look up the *.zip file specifications [I know they have to start with the ASCII string, "PK", followed by an integer version number] and implement the LZW compression algorithm on whatever files you needed to compress and store the result as a *.zip file.

      This result is especially good if you are interested in methodology rather than ease of programming.

      Comment

      • lumpybanana247
        New Member
        • Apr 2007
        • 134

        #4
        thanks to you both for your help

        Comment

        Working...