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_compress_data.c

    r38334 r38340  
    2727int gfits_compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
    2828
     29# define ESCAPE(RET) { fprintf (stderr, "gzip error in %s @ %s:%d\n", __func__, __FILE__, __LINE__); return (RET); }
     30
    2931int gfits_compress_data (char *zdata, int *Nzdata, char *cmptype,
    3032                         char **optname, char **optvalue, int Nopt,
     
    5355    status = gfits_compress ((Bytef *) zdata, &destLen, (Bytef *) rawdata, Nbytes);
    5456    *Nzdata = destLen;
    55     if (status != Z_OK) {
    56       fprintf (stderr, "error in compress (GZIP)\n");
    57       return (FALSE);
    58     }
     57    if (status != Z_OK) ESCAPE(FALSE);
    5958    return (TRUE);
    6059  }
Note: See TracChangeset for help on using the changeset viewer.