LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a zip file from data in memory, no temporary files?

Is there a way I can basically create a zip from binary data that is in memory (eg. already on the wires) instead of having to write the data to disk as temporary files and then zipping them?

 

In a similar vain, is there a way to convert a string into the equivalent of a txt file binary stream without actually writing it to a txt file on disk like using the write text/binary file vis do?

 

It's not that I'm trying to super optimize performance or anything, I've simply just run into too many file permission problems and users messing up temp directories that I'd like to simply eliminate this failure point which in theory is not even technically difficult, just can't figure out how to do it in the world of LabVIEW. 

0 Kudos
Message 1 of 5
(1,052 Views)

@DoctorAutomatic wrote:

Is there a way I can basically create a zip from binary data that is in memory (eg. already on the wires) instead of having to write the data to disk as temporary files and then zipping them?


Not 100% sure if the openG zip tools do that. Worth a try.

 


@DoctorAutomatic wrote:

In a similar vain, is there a way to convert a string into the equivalent of a txt file binary stream without actually writing it to a txt file on disk like using the write text/binary file vis do?


A string is binary data. Nothing to do.  If you want to e.g. append to an existing string, keep it in a shift register.

 

(Can you clarify what you are trying to do instead of how you are trying to do it?)

0 Kudos
Message 2 of 5
(1,045 Views)

It's not that I'm trying to super optimize performance or anything, I've simply just run into too many file permission problems and users messing up temp directories that I'd like to simply eliminate this failure point which in theory is not even technically difficult, just can't figure out how to do it in the world of LabVIEW. 


In this case, do you have a reference of a code snippet from another programming language (like C, C++, C# or Python) that you are trying to achieve in LabVIEW?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 3 of 5
(1,025 Views)

@DoctorAutomatic wrote:

 I've simply just run into too many file permission problems and users messing up temp directories that I'd like to simply eliminate this failure point which in theory is not even technically difficult, just can't figure out how to do it in the world of LabVIEW. 


LabVIEW has a predefined link (see also further links there) to %TEMP% and there should not be any permission problems, ever. Your program should be able to create any temporary file you want there. What exactly are you afraid that you users are doing?

 

 

0 Kudos
Message 4 of 5
(1,022 Views)

@altenbach wrote:

@DoctorAutomatic wrote:

Is there a way I can basically create a zip from binary data that is in memory (eg. already on the wires) instead of having to write the data to disk as temporary files and then zipping them?


Not 100% sure if the openG zip tools do that. Worth a try.


They certainly do! They use LabVIEW strings and in hindsightI should have chosen byte arrays instead but LabVIEW strings are up to today still the same as byte arrays. Wish iit was not!

Rolf Kalbermatter
My Blog
Message 5 of 5
(1,008 Views)