LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

U8 Data compression/decompression

There might be a lot of confusion about what is ZIP and what is not ZIP. First it is used to indicated many types of compressions. Technically there is only one true ZIP standard however and that is how pkzip has defined it long ago, with some extensions that were later added to by various ZIP providers such as 64 bit extensions etc. etc.

 

As such ZIP is an archive format with a directory structure managed by a contents list. Each entry in that contents list points to a stream inside the file that is compressed (usually using the zlib compression method). Thechnically there is no ZIP standard to compress a single data stream. It is always an entire archive with contents list even if that archive only contains a single stream. So the question here really is if your buddy created a real ZIP file with one single stream in there or just a compressed stream using the ZLIB deflate algorithme.

The String based VIs that Alex was pointing out expose this ZLIB inflate and deflate routines. However transmitting just this ZLIB stream alone isn't really possible as you also need to know extra informations like the uncompressed size to expand into and and a crc value to verify that the decompression was successful. So most methods using only the ZLIB deflate method will add a small header to the compressed stream that contains these values. That is for instance what gzip is about. Without knowing in more detail how "sadistic" your friend was it is really difficult to give you any further recommendation to go about this.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 11 of 11
(587 Views)