I'm looking for the ability to extract .tgz archives from a .NET application. From what I understand, .NET has libraries that handle gzip compression, but not tar.
I've also found online the "SharpZipLib" utilities someone's written to support both tar and gzip compression.
Has anyone used these, or have a better suggestion to offer? I'm new to .NET programming, and I'd like to be sure I'm taking the right approach before I dive in.
I've never used tarballs before. Is TGZ a combination of TAR and GZIP? If so then I guess #ZipLib will do the job. I've made a CodeBank submission (see my signature) that wraps #ZipLib to make it friendlier to use, but I've only included ZIP support. You're welcome to use the source code as a basis to learn how to use #ZipLib for other formats though. The code is VB.NET but if you're using C# you could make use of the code converter link in my sig.
I've never used tarballs before. Is TGZ a combination of TAR and GZIP? If so then I guess #ZipLib will do the job. I've made a CodeBank submission (see my signature) that wraps #ZipLib to make it friendlier to use, but I've only included ZIP support. You're welcome to use the source code as a basis to learn how to use #ZipLib for other formats though. The code is VB.NET but if you're using C# you could make use of the code converter link in my sig.
Yes, tgz is a combination of tar and gzip...very common in the Linux environment.
I'm writing in VB.NET, so if you could help and offer the code you have, that would be fantastic. I'm brand new to VB.NET, and I must admit I was a bit lost when I looked through the code for SharpZipLib. I have no idea how to merge it into the app I'm writing.
Follow the ZIP link in my signature to my CodeBank submission. Like I said, it doesn't support anything but the ZIP format but to use #ZipLib with other formats it should just be a case of doing the same thing with the types that correspond to that format.
Follow the ZIP link in my signature to my CodeBank submission. Like I said, it doesn't support anything but the ZIP format but to use #ZipLib with other formats it should just be a case of doing the same thing with the types that correspond to that format.
Thank you so much...I'll look it over and come back if I have any questions.
Follow the ZIP link in my signature to my CodeBank submission. Like I said, it doesn't support anything but the ZIP format but to use #ZipLib with other formats it should just be a case of doing the same thing with the types that correspond to that format.
I'm having trouble compiling #ZipLib. In AssemblyInfo.cs, it says Error: Use command line option '/keyfile' or appropriate project settings instead of 'AssemblyKeyFile'.
I tried compiling in VisualStudio and SharpDevelop and get similar errors. I have no idea what this 'key' business is all about.
I got my .tgz files extracting! Thanks for your help.
I do have one more question, though. My app won't run without the dll included. Is there any way to statically link the #ziplib classes? Or should I just grab the relevant source files and include them with my project?
You can distribute the #ZipLib library with your app with no issue. Unless you specify otherwise it will automatically be copied to your output folder so it is a simple task to distribute it with your app. The other option is install it in the Global Assembly Cache. I've never installed anything in the GAC myself so I don't know all the details. Either way, the #ZipLib library has to be present on the machine for your app to work. The advantage of using the GAC is that multiple apps can use the one library instead of providing their own copy every time.
You can distribute the #ZipLib library with your app with no issue. Unless you specify otherwise it will automatically be copied to your output folder so it is a simple task to distribute it with your app. The other option is install it in the Global Assembly Cache. I've never installed anything in the GAC myself so I don't know all the details. Either way, the #ZipLib library has to be present on the machine for your app to work. The advantage of using the GAC is that multiple apps can use the one library instead of providing their own copy every time.
Well, I'd really like this app to be a single file so people don't have to worry about grabbing the dll whenever they pass it around (it's not an installation). I'll try to compile the #ziplib source files into the project and see how that works.
Take a good look at the license for #ZipLib. You are not just free to do whatever you want with that source code. You may have to include a ReadMe or something specifying that you have used that code, and you may have to use the code in it's entirety. It may be that you are not allowed to compile it into your own assembly. I don't know what the conditions are but you should definitely check before you do anything.
Take a good look at the license for #ZipLib. You are not just free to do whatever you want with that source code. You may have to include a ReadMe or something specifying that you have used that code, and you may have to use the code in it's entirety. It may be that you are not allowed to compile it into your own assembly. I don't know what the conditions are but you should definitely check before you do anything.
It's licensed under the GPL, which means I can use it and modify it as long as I include the source with its distribution. I planned to do that anyway, since I'm writing this for a GPL licensed poject.