IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38343


Ignore:
Timestamp:
May 31, 2015, 8:59:47 AM (11 years ago)
Author:
eugene
Message:

turn on byteswap for gzip

Location:
branches/eam_branches/ohana.20150429/src/libfits
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20150429/src/libfits/table/F_compress_T.c

    r38342 r38343  
    154154     
    155155      int Nraw = Nrows*fields[j].Nvalues; // number of pixels
     156      if (!strcmp(fields[j].zctype, "GZIP_1")) {
     157        if (!gfits_byteswap_zdata (raw, Nraw, fields[j].pixsize)) ESCAPE(A);
     158      }
     159
    156160      int Nzdata = Nzdata_alloc; // available space, replaced with actual output size on compression
    157161      if (!gfits_compress_data (zdata, &Nzdata, fields[j].zctype, NULL, NULL, 0, raw, Nraw, fields[j].pixsize)) ESCAPE(A);
  • branches/eam_branches/ohana.20150429/src/libfits/table/F_uncompress_T.c

    r38342 r38343  
    124124      if (!gfits_uncompress_data (zdata, Nzdata, fields[i].zctype, NULL, NULL, 0, raw, &Nraw, fields[i].pixsize)) ESCAPE(A);
    125125
     126      if (!strcasecmp(fields[i].zctype, "GZIP_1")) {
     127        myAssert ((fields[i].zdef.format != 'C') && (fields[i].zdef.format != 'M'), "swap is probably wrong for C or M columns");
     128        if (!gfits_byteswap_zdata (raw, Nraw, fields[i].pixsize)) ESCAPE(A);
     129      }
     130
    126131      off_t row_start = row*ztilelen;
    127132      // ^- first row for this tile & field
  • branches/eam_branches/ohana.20150429/src/libfits/test/compress.sh

    r38342 r38343  
    119119 delete -q x
    120120
    121  $NPT = 10
     121 $NPT = 1000
    122122 create x 0 $NPT
    123123
     
    177177 delete -q x y z
    178178
    179  $NPT = 10
     179 $NPT = 1000
    180180 create x 0 $NPT
    181181 set y = x^2
Note: See TracChangeset for help on using the changeset viewer.