LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

saving clusters in a .dat file

I save continuously cluster in a .dat file; the cluster has 3 2D array, 4 string constant, 1 numeric, 1 Enum, an array of cluster.
Sometimes I save clusters containing 3 2D arrays and all other elements empty; other times i save a cluster with 2D arrays empty and all the other
elements full.
I think the empty elements do not take up memory, but if i zip the .dat file his dimension is halved.. why?
there is a best way to save in a single file my different type elements contained in clusters?

0 Kudos
Message 1 of 4
(2,658 Views)

By dimension do you mean the file size?

 

If so, zipping algorithms are pretty clever in how they compress the data - they look for patterns in the binary data and try to reduce them down. Depending on the contents of the file this can be either very efficient or not very efficient at all.

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 4
(2,650 Views)

yes, the file size

0 Kudos
Message 3 of 4
(2,648 Views)

Hi,

 

As SAM stated, the "zip" is compression tool. It reduces the file size drametically when they are in original format. the files we see like DOC or XLS or simillar are already algorithemed and compressed. While "DAT" is pure binary file. So, it gets compressed very much in size (Almost Halved).

 

The same thing I have noticed for "BITFILES" generated for RT target, as they are pure binary files.

 

So, dont worry about data loss. After decompression, you will get full data.

 

Regards, 

 

DCKAN.


Best Regards,
DCKAN

"We make a Living by what we get. We make a Life by what we give."
0 Kudos
Message 4 of 4
(2,624 Views)