I want to rewind a compressed file - to do that normally
close, lun
openr,lun,filename,/compressed
However this is not sufficient. Below, sampledat and sampleat.gz have the same content: First the sampledat is opened and displayed, close, then displayed again. Then similar actions on the compressed file.
$ gdlcvs
GDL - GNU Data Language, Version 0.9.7 CVS
% Compiled module: PATH_SEP.
GDL> fn='sampledat'
GDL> openr,101,fn & ll=bytarr(80)
GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
SIMPLE = T / HDU 0==========================================
BITPIX = 8 / Number of bits per data pixel
NAXIS = 0 / Number of data axes
EXTEND = T / FITS dataset may include extensions
COMMENT +------------------+
COMMENT | XTE - FITS File |
COMMENT | Generated by XFF |
COMMENT +------------------+
COMMENT >>>>> >>>>> <<<<< <<<<<
COMMENT > This file is written following certain XTE-GOF <
GDL> close,101
GDL> openr,101,fn
GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
SIMPLE = T / HDU 0==========================================
BITPIX = 8 / Number of bits per data pixel
NAXIS = 0 / Number of data axes
EXTEND = T / FITS dataset may include extensions
COMMENT +------------------+
COMMENT | XTE - FITS File |
COMMENT | Generated by XFF |
COMMENT +------------------+
COMMENT >>>>> >>>>> <<<<< <<<<<
COMMENT > This file is written following certain XTE-GOF <
GDL> close,101
GDL> openr,101,fn+".gz",/comp
GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
SIMPLE = T / HDU 0==========================================
BITPIX = 8 / Number of bits per data pixel
NAXIS = 0 / Number of data axes
EXTEND = T / FITS dataset may include extensions
COMMENT +------------------+
COMMENT | XTE - FITS File |
COMMENT | Generated by XFF |
COMMENT +------------------+
COMMENT >>>>> >>>>> <<<<< <<<<<
COMMENT > This file is written following certain XTE-GOF <
GDL> close,101
GDL> openr,101,fn+".gz",/comp
GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
COMMENT > conventions which are documented in XFF/95-004 <
COMMENT >>SIMPLE = T / HDU 0===================
=======================BITPIX = 8 / Number of bits per data
pixel NAXIS = 0 / Number of data axes
EXTEND = T / FITS dataset may include
extensions COMMENT +------
------------+ COMMENT | XTE -
FITS File | COMMENT | Gener
ated by XFF | COMMENT +------
------------+ COMMENT >>>>> >>>>> <<<<<
GDL> close,101
GDL> openr,101,fn+".gz",/comp
GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
<<<<< COMMENT > This file is written following
certain XTE-GOF < COMMENT > conventions which are documente
d in XFF/95-004 < COMMENT >>SIMPLE = T / H
DU 0==========================================BITPIX = 8 / N
umber of bits per data pixel NAXIS = 0 / N
umber of data axes EXTEND = T / F
ITS dataset may include extensions COMMENT
+------------------+ COMMENT
| XTE - FITS File | COMMENT
| Generated by XFF | COMMENT
GDL> free_lun,101
GDL> openr,101,fn+".gz",/comp
GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
SIMPLE = T / HDU 0==========================================
BITPIX = 8 / Number of bits per data pixel
NAXIS = 0 / Number of data axes
EXTEND = T / FITS dataset may include extensions
COMMENT +------------------+
COMMENT | XTE - FITS File |
COMMENT | Generated by XFF |
COMMENT +------------------+
COMMENT >>>>> >>>>> <<<<< <<<<<
COMMENT > This file is written following certain XTE-GOF <
GDL> close,101
GDL> openr,101,fn+".gz",/comp
GDL> for k=0,9 do begin & readu,101,ll & print,string(ll) & endfor
COMMENT > conventions which are documented in XFF/95-004 <
COMMENT >>SIMPLE = T / HDU 0===================
=======================BITPIX = 8 / Number of bits per data
pixel NAXIS = 0 / Number of data axes
EXTEND = T / FITS dataset may include
extensions COMMENT +------
------------+ COMMENT | XTE -
FITS File | COMMENT | Gener
ated by XFF | COMMENT +------
------------+ COMMENT >>>>> >>>>> <<<<<
GDL> exit
solved in cvs now.
Should we close it?
Yes I believe the compressed file issues were resolved.
BTW I haven't received notice, and so I assume I am not included yet,
on the github list. Thanks.
Greg
On Thu, Apr 5, 2018 at 2:42 PM, Sylwester Arabas slayoo@users.sourceforge.net wrote:
Related
Bugs:
#724Closing.