05-22-2022 05:05 PM
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.
05-22-2022 05:28 PM - edited 05-22-2022 05:30 PM
@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?)
05-22-2022 06:25 PM
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?
05-22-2022 06:44 PM - edited 05-22-2022 07:11 PM
@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?
05-22-2022 07:32 PM - edited 05-22-2022 07:35 PM
@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!