LZMA SDK and .zip files
-
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
-
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
-
Yes, that's where I started.
-
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
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#.
-
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#.
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
-
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
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