LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unzip files within labview

So I downloaded and tried the zlib inflate.vi from gspot and it is coming up with an error everytime.  The data is supposively simple zlib compressed data. When pulled up with a text editor the data is all unreadable symbols.  I used the zlib inflate.vi unsuccessfully.  Any suggestions for uncompressing this thing in labview?

0 Kudos
Message 81 of 91
(2,750 Views)

hilbert wrote:

So I downloaded and tried the zlib inflate.vi from gspot and it is coming up with an error everytime.  The data is supposively simple zlib compressed data. When pulled up with a text editor the data is all unreadable symbols.  I used the zlib inflate.vi unsuccessfully.  Any suggestions for uncompressing this thing in labview?


I'm not sure what gspot is, at least in terms of software downloads. Smiley Very Happy

 

But if Inflate doesn't work then there has probably another algorithme been used. This is THE ZLIB decompress algorithme.

 

Rolf Kalbermatter 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 82 of 91
(2,739 Views)

lol I meant to say openG, I guess I had a little Freudian slip.  But yea, the ZLIB inflate.vi did not work, is there any other way known in Labview to unzip a zlib compressed file besides that one single vi?

 

thanks

0 Kudos
Message 83 of 91
(2,706 Views)
If anyone is really interested in helping, I could email you the .dat file that is zlib compressed and other info... 
0 Kudos
Message 84 of 91
(2,704 Views)

hilbert wrote:
If anyone is really interested in helping, I could email you the .dat file that is zlib compressed and other info... 

I think the dat file will help little. More interesting would be the application that created it.

 

Most likely that application adds some form of header to the data, so that you need to cut that header off before passing it to Inflate. It could be as simple as a 2 or 4 bytes of identifier to indicate a the file type and/or some 4 byte integer indicating the number of bytes the stream contains.

 

If it is gzip you can see under http://en.wikipedia.org/wiki/Gzip that it contains 10 bytes of header data with optional header data following and then the actual zlib stream.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 85 of 91
(2,672 Views)

File Structure: 16384 Bytes of Text Info followed by the image data which is compresed using zlib compression.

 

This is an email that was sent to me from the company that created the file.  If this statement is true should zlib inflate.vi work to inflate the data if I offset after the text?  Or is there the possibility that zlib inflate will not work?

 

0 Kudos
Message 86 of 91
(2,619 Views)

I would guess so, unless they added in fact something ahead of the actual zlib data stream such as an identifer and/or size. But who knows better than the guys who created that file?

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 87 of 91
(2,616 Views)

How would you set up the vi in order to uncompress the file?  Right now I just have the zlib inflate.vi connected to a set file position.vi that is connected to a read from binary.vi.  I am not too sure about this setup.

 

To answer question "who would know better than the company who sent the email?"  The company is very slow in response time, sometimes a week and I do not think the man I am in contact with has knowledge of labview.

0 Kudos
Message 88 of 91
(2,610 Views)

hilbert wrote:

How would you set up the vi in order to uncompress the file?  Right now I just have the zlib inflate.vi connected to a set file position.vi that is connected to a read from binary.vi.  I am not too sure about this setup.

 

To answer question "who would know better than the company who sent the email?"  The company is very slow in response time, sometimes a week and I do not think the man I am in contact with has knowledge of labview.


Your setup for the VI sounds a little confusing eventhough the individual bits sound ok. But it is unclear to me if you just described it a bit confusing or if you did it wrong.

 

As to the knowledge of LabVIEW, this has nothing to do with knowing LabVIEW or not but everything about how that file was generated. Just try to play a bit. Without a clear data file layout written as an official spec, all even a professional can do is trial and error.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 89 of 91
(2,589 Views)

Hello Mads,

 

Is this library available back-compiled for our aged LabView 8.01?

 

I'd like to try the unzipping functionality out.

 

Thanks in advance,

 

Alex

 

 

0 Kudos
Message 90 of 91
(2,441 Views)