LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to zip a string

   LabVIEW now has zip functions built in, allowing you to zip to a file.  But what if you want to compress a string for other use-cases?  Why can't we have a simple zip-a-string function?  For example, you might want to compress a string before transmitting it over a relatively slow buss.


DaveT

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 1 of 4
(3,306 Views)
It would appear to me, that if one is building a custom protocol as referenced in the example, one could develop protocols that were more efficient that zipping ever thought about being.  Honestly, I cannot think of a compelling reason to do that except to transmit verbatim data, in which case, you could write to a zip file, read it into a string and transmit... a work around to be sure, but gets it done.

Paul
0 Kudos
Message 2 of 4
(3,299 Views)

If you don't mind using .NET, this might help:

 

GZIP compress/uncompress of string using .NET

 

 

0 Kudos
Message 3 of 4
(3,265 Views)

OpenG has a Compress string function.

 

 

 

Ton

Message Edited by TCPlomp on 14-04-2010 01:31 PM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 4 of 4
(3,252 Views)