LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Uncompressing .Z files

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!

 

 

0 Kudos
Message 1 of 6
(4,038 Views)

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. 

0 Kudos
Message 2 of 6
(3,990 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 6
(3,986 Views)

@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...

0 Kudos
Message 4 of 6
(3,975 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 6
(3,962 Views)

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.

 

https://lavag.org/topic/16513-can-we-prevent-zlib-compress-dir-from-replacing-accented-characters/#e...

Message 6 of 6
(3,937 Views)