comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: File sizes and the SAVE command
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: File sizes and the SAVE command [message #48050 is a reply to message #48048] Wed, 22 March 2006 03:58 Go to previous messageGo to previous message
Klaus Scipal is currently offline  Klaus Scipal
Messages: 45
Registered: November 1997
Member
The problem is not related to the calculation of the filesize, but the
actual amount of memory required

Take two arrays
a=intarr(100000)
b=fltarr(100000)

and save them using the save comannd
the file for array a takes 402096 bytes diskspace
the file for array b takes 402096 bytes diskspace

save them using openw & writeu
the file for array a takes 200000 bytes diskspace
the file for array b takes 400000 bytes diskspace

So the save command seems to waste a lot of diskspace, but why? Does the IDL
save command convert an integer automatically into a longinteger?

Klaus




"Maarten" <maarten.sneep@knmi.nl> wrote in message
news:1143025802.678782.180020@i39g2000cwa.googlegroups.com.. .
> I don't think you calculated quite what you thought you did.
>
> tmp = size(a) & tmp[1]*tmp[2]
> for a single dimensional array a will be the length of the array times
> the _type_ of the array, which has nothing to do with the actual
> byte-size of the elements.
>
> The save-sizes seem consistent though: 100000 * 4 bytes for float and
> int (long), double that for double precision floating point data.
>
> Maarten
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 4D interpolation
Next Topic: Re: Need help in IDLgrSurface and vertical exaggeration

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 22:13:51 PDT 2025

Total time taken to generate the page: 1.03811 seconds