IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38402


Ignore:
Timestamp:
Jun 6, 2015, 7:53:42 AM (11 years ago)
Author:
eugene
Message:

record compression options

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

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20150429/src/libdvo/include/dvo.h

    r38351 r38402  
    1313
    1414/* DVO table modes */
    15 typedef enum {DVO_COMPRESS_NONE = 0, DVO_COMPRESS_GZIP_1} DVOCatCompress; //
     15typedef enum {DVO_COMPRESS_NONE = 0, DVO_COMPRESS_AUTO, DVO_COMPRESS_GZIP_1, DVO_COMPRESS_GZIP_2, DVO_COMPRESS_RICE_1} DVOCatCompress; //
    1616
    1717/* DVO table formats */
  • branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_catalog.c

    r38351 r38402  
    7575  /* set the specified CATMODE */
    7676  if (!strcasecmp (catcompress, "NONE"))   return (DVO_COMPRESS_NONE);
     77  if (!strcasecmp (catcompress, "AUTO"))   return (DVO_COMPRESS_AUTO);
    7778  if (!strcasecmp (catcompress, "GZIP_1")) return (DVO_COMPRESS_GZIP_1);
     79  if (!strcasecmp (catcompress, "GZIP_2")) return (DVO_COMPRESS_GZIP_2);
     80  if (!strcasecmp (catcompress, "RICE_1")) return (DVO_COMPRESS_RICE_1);
    7881  return (DVO_COMPRESS_NONE);
    7982}
     
    8790      strcpy (compress_string, "NONE");
    8891      break;
    89       case DVO_COMPRESS_GZIP_1:
     92    case DVO_COMPRESS_AUTO:
     93      strcpy (compress_string, "AUTO");
     94      break;
     95    case DVO_COMPRESS_GZIP_1:
    9096      strcpy (compress_string, "GZIP_1");
     97      break;
     98    case DVO_COMPRESS_GZIP_2:
     99      strcpy (compress_string, "GZIP_2");
     100      break;
     101    case DVO_COMPRESS_RICE_1:
     102      strcpy (compress_string, "RICE_1");
    91103      break;
    92104    default:
  • branches/eam_branches/ohana.20150429/src/libdvo/src/dvo_catalog_split.c

    r38354 r38402  
    122122    if (!gfits_compress_table (ftable, &cmptable, 10, compressMode)) {
    123123      fprintf (stderr, "compression failure\n");
     124      return (FALSE);
     125    }
     126    if (!gfits_modify (cmptable.header, "DVO_CMP", "%s", 1, compressMode)) {
     127      fprintf (stderr, "can't save compression mode\n");
    124128      return (FALSE);
    125129    }
     
    251255      return FALSE;
    252256    }
    253     catalog->catcompress = DVO_COMPRESS_GZIP_1; // if any table is compressed, set all to a compress state?
     257
     258    char compressMode[80];
     259    if (!gfits_scan (ftable->header, "DVO_CMP", "%s", 1, compressMode)) {
     260      strcpy (compressMode, "AUTO");
     261    }
     262    catalog->catcompress = dvo_catalog_catcompress (compressMode); // if any table is compressed, set all to a compress state?
    254263
    255264    // free the buffers
Note: See TracChangeset for help on using the changeset viewer.