Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. LZMA SDK and .zip files

LZMA SDK and .zip files

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++algorithmshelptutorial
6 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    John Malcosky
    wrote on last edited by
    #1

    Hi, I'm trying to create .zip files within a C# application with the LZMA SDK. The code worked immediately, but I can't figure out how to produce a .zip output, and I must have plain .zip. The 7z GUI produces .zip files with no problem, so it must be possible with the SDK. I thought sure that changing the "algorithm" property was the answer, but running tests with that property ranging from 0 to 8 produced no apparent change in the output. Windows Explorer (7) rejects all such efforts, while the 7z GUI opens the outputs, no matter what. I've spent too much time perusing the C++ source code for the GUI. It's obvious that the author has a command of C++ that's an order of magnitude greater than mine. In short, what property need I set to what to yield a .zip output? Thank you. John

    C G L 3 Replies Last reply
    0
    • J John Malcosky

      Hi, I'm trying to create .zip files within a C# application with the LZMA SDK. The code worked immediately, but I can't figure out how to produce a .zip output, and I must have plain .zip. The 7z GUI produces .zip files with no problem, so it must be possible with the SDK. I thought sure that changing the "algorithm" property was the answer, but running tests with that property ranging from 0 to 8 produced no apparent change in the output. Windows Explorer (7) rejects all such efforts, while the 7z GUI opens the outputs, no matter what. I've spent too much time perusing the C++ source code for the GUI. It's obvious that the author has a command of C++ that's an order of magnitude greater than mine. In short, what property need I set to what to yield a .zip output? Thank you. John

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      Shouldn't you rather be looking for an answer here[^]?

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

      J 1 Reply Last reply
      0
      • C Code o mat

        Shouldn't you rather be looking for an answer here[^]?

        > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

        J Offline
        J Offline
        John Malcosky
        wrote on last edited by
        #3

        Yes, that's where I started.

        1 Reply Last reply
        0
        • J John Malcosky

          Hi, I'm trying to create .zip files within a C# application with the LZMA SDK. The code worked immediately, but I can't figure out how to produce a .zip output, and I must have plain .zip. The 7z GUI produces .zip files with no problem, so it must be possible with the SDK. I thought sure that changing the "algorithm" property was the answer, but running tests with that property ranging from 0 to 8 produced no apparent change in the output. Windows Explorer (7) rejects all such efforts, while the 7z GUI opens the outputs, no matter what. I've spent too much time perusing the C++ source code for the GUI. It's obvious that the author has a command of C++ that's an order of magnitude greater than mine. In short, what property need I set to what to yield a .zip output? Thank you. John

          G Offline
          G Offline
          Graham Breach
          wrote on last edited by
          #4

          I think you're getting confused between two different things. 7-Zip is an application that can compress and decompress several types of file, whereas the LZMA SDK is for compressing and decompressing using the LZMA algorithm. If all you want to do is create ZIP files, then zlib would probably be a better option: http://www.zlib.net/[^] or maybe system.io.compression.zipfile[^] since you're using C#.

          J 1 Reply Last reply
          0
          • G Graham Breach

            I think you're getting confused between two different things. 7-Zip is an application that can compress and decompress several types of file, whereas the LZMA SDK is for compressing and decompressing using the LZMA algorithm. If all you want to do is create ZIP files, then zlib would probably be a better option: http://www.zlib.net/[^] or maybe system.io.compression.zipfile[^] since you're using C#.

            J Offline
            J Offline
            John Malcosky
            wrote on last edited by
            #5

            LZMA SDK Copyright (C) 1999-2007 Igor Pavlov LZMA is default and general compression method of 7z format in 7-Zip compression program (www.7-zip.org). LZMA provides high compression ratio and very fast decompression. ----------------------- It doesn't mention .zip, or the other compression schemes 7 Zip handles, as coming out of LZMA, does it? Sorry I bothered you. John

            1 Reply Last reply
            0
            • J John Malcosky

              Hi, I'm trying to create .zip files within a C# application with the LZMA SDK. The code worked immediately, but I can't figure out how to produce a .zip output, and I must have plain .zip. The 7z GUI produces .zip files with no problem, so it must be possible with the SDK. I thought sure that changing the "algorithm" property was the answer, but running tests with that property ranging from 0 to 8 produced no apparent change in the output. Windows Explorer (7) rejects all such efforts, while the 7z GUI opens the outputs, no matter what. I've spent too much time perusing the C++ source code for the GUI. It's obvious that the author has a command of C++ that's an order of magnitude greater than mine. In short, what property need I set to what to yield a .zip output? Thank you. John

              L Offline
              L Offline
              leon de boer
              wrote on last edited by
              #6

              Like most of these zip programs you can change the compression format off the command line. So set a command line on your compiler and follow it. The documentation to Z-Zip says Type switches Switch: -t7z Format: 7Z Example filename: archive.7z (default option) Switch: -tgzip Format: GZIP Example filename: archive.gzip, archive.gz Switch: -tzip Format: ZIP Example filename: archive.zip (compatible) Switch: -tbzip2 Format: BZIP2 Example filename: archive.bzip2 Switch: -ttar Format: TAR Example filename: tarball.tar (UNIX and Linux) Switch: -tiso Format: ISO Example filename: image.iso (may not be supported) Switch: -tudf Format: UDF Example filename: disk.udf So setup a command line to some file with -tZip and follow what it does.

              In vino veritas

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups