Re: FILE_GZIP removes file extension [message #84853 is a reply to message #84848] |
Thu, 13 June 2013 16:18   |
timothyja123
Messages: 57 Registered: February 2013
|
Member |
|
|
On Friday, June 14, 2013 3:08:30 AM UTC+10, David Fanning wrote:
> This is really strange. It looks like a bug, but the more I fool with it
> the more it looks like a completely non-intuitive design feature! It is
> strange we haven't heard from ExelisVis about this. But, I have written
> a short article that describes what you have to do to preserve the file
> extension of the compressed file here:
>
> http://www.idlcoyote.com/fileio_tips/extgone.php
>
> Cheers,
> David
Hi David,
I looked into this a bit further taking a look at the gzip command options in Linux and it would seem that IDL is doing the compression in a similar way as having set the -n option.
-n --no-name
When compressing, do not save the original file name and time stamp by default. (The original name is always saved if the name had to be truncated.) When decompressing, do not restore the original file name if present (remove only the gzip suffix from the compressed file name) and do not restore the original time stamp if present (copy it from the compressed file). This option is the default when decompressing.
However it seems to me that it would be good to have an option to save the original name. In fact you would think that would be the default to save the original to be consistent with how the file_zip routine works and have the option to not save the original name.
Tim
|
|
|