- Timestamp:
- Jun 5, 2015, 7:58:50 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20150429/src/libfits/table/F_compress_T.c
r38366 r38399 78 78 if (!gfits_scan_alt (srcheader, keyword, "%C", 1, fields[i].tformat_cmt)) ESCAPE; 79 79 80 // for now we set all fields to the requested type 80 // for now we set all fields to the requested type. since I do not yet know the column data types I cannot yet assign automatic cmptypes 81 81 strcpy (fields[i].zctype, zcmptype); 82 82 … … 127 127 fields[i].rowsize = fields[i].Nvalues*fields[i].pixsize; 128 128 max_width = MAX(max_width, fields[i].rowsize); 129 130 if (!strcasecmp (fields[i].zctype, "AUTO")) { 131 if (!strcmp (fields[i].datatype, "float") || 132 !strcmp (fields[i].datatype, "double")|| 133 !strcmp (fields[i].datatype, "int64_t")) { 134 strcpy (fields[i].zctype, "GZIP_2"); 135 goto got_cmptype; 136 } 137 if (!strcmp (fields[i].datatype, "byte") || 138 !strcmp (fields[i].datatype, "short") || 139 !strcmp (fields[i].datatype, "int")) { 140 strcpy (fields[i].zctype, "RICE_1"); 141 goto got_cmptype; 142 } 143 if (!strcmp (fields[i].datatype, "char")) { 144 strcpy (fields[i].zctype, "GZIP_1"); 145 goto got_cmptype; 146 } 147 } 148 got_cmptype: 149 129 150 130 151 // RICE can only be used on integer fields
Note:
See TracChangeset
for help on using the changeset viewer.
