IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 30, 2015, 7:59:48 PM (11 years ago)
Author:
eugene
Message:

more work on compression : cfitsio assumes gzip, not zlib (I have made uncompress general )

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20150429/src/libfits/matrix/F_uncompress_data.c

    r38334 r38340  
    2626int gfits_uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
    2727
     28# define ESCAPE(RET) { fprintf (stderr, "gzip error in %s @ %s:%d\n", __func__, __FILE__, __LINE__); return (RET); }
     29
    2830int gfits_uncompress_data (char *zdata, int Nzdata, char *cmptype, char **optname, char **optvalue, int Nopt, char *outdata, int *Nout, int out_pixsize) {
    2931
     
    4951    // XXX shouldn't we validate the result : we think we know the size
    5052    status = gfits_uncompress ((Bytef *) outdata, &tNout, (Bytef *) zdata, Nzdata);
    51     if (status != Z_OK) {
    52       fprintf (stderr, "error in uncompress (GZIP)\n");
    53       return (FALSE);
    54     }
     53    if (status != Z_OK) ESCAPE(FALSE);
    5554    *Nout = tNout / out_pixsize;
    5655
Note: See TracChangeset for help on using the changeset viewer.