03-23-2015 01:58 PM
Has anyone had any luck uncompressing .Z files (Old UNIX compression format)? Here is what I've tried:
http://www.ni.com/example/28662/en/ - which is LV5... I wasn't sure this was the right solution anyway.
OpenG ZLib - Can't get it to open a .Z file. Returns "Not Found" which makes me think it doesn't support .Z files. Documentation on that library is sparse.
Base zlib DLL (http://www.zlib.net/) - Looks like it might work, but "Import -> DLL" seems to crash LabVIEW every time. I'd have to go through the .h files manually and figure out what parameters need to be fed in to the function calls. I could do this, but... I'm hoping somoene has done this before and has a canned solution before I spend 3 hours rummaging through header files 🙂
Thanks!
03-24-2015 12:56 PM
Hi BowenM,
Why are you attempting this? What are your application goals? Do you absolutely have to uncompress it in LabVIEW? If so, you can try downloading a trial version of LabVIEW 2014 and importing the DLL.
03-24-2015 01:04 PM
Have you tried 7-zip? If that works, then you can use the System Exec VI to use command line commands to zip and unzip your files.
03-24-2015 01:42 PM - edited 03-24-2015 01:45 PM
@jMunny wrote:
Hi BowenM,
Why are you attempting this? What are your application goals? Do you absolutely have to uncompress it in LabVIEW? If so, you can try downloading a trial version of LabVIEW 2014 and importing the DLL.
I'm doing it because my customer told me to in order to support historical data. The "End User" never has direct access to data so uncompressing it outside of the compiled code is not an option. I'm already using 2014, already attempted to import the DLL, and already had it repeatedly crash.
As for 7zip, I can't install any open source software unfortunately. I can use DLLs (because those IT will keep their grubby little hands out of). I ended up using a system exec with winzip. I hate winzip, but it is corporate IT approved!
Thank you both for your responses.
Edit: For clarity, I was hoping for a method that didn't rely on call to a 3rd party executable... especially with IT involved. They have a tendancy to push updates / software changes, and I can't promise that winzip will continue to support the .Z format. I mean, they SHOULD, but...
03-24-2015 02:45 PM
BowenM wrote: I ended up using a system exec with winzip. I hate winzip, but it is corporate IT approved!
That was the other program I have done the sytem exec with. 7Zip is so much better.
One possible way around your issue is to just include the 7zip executable with your program. It can just sit right there inside your support directory and IT needs to know nothing about it. No installing it. Just copying the latest executable into your project. I have not tried that myself (my IT loves 7zip), but I have been told that it works.
03-25-2015 09:36 AM
Glad you found a solution. In the past I've used the 7-zip command line option and embedd the 7-zip binary in the VI. This way there is no external dependencies. A better programmer would embed the DLL but a command line is so easy to use.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord