IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 4, 2015, 5:42:47 PM (11 years ago)
Author:
eugene
Message:

libfits compressed I/O seems to be generally working

File:
1 edited

Legend:

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

    r38363 r38366  
    165165
    166166  // define compression-specific keywords, update header as needed.
    167   if (!strcasecmp(zcmptype, "RICE_1")) {
     167  if (!strcasecmp(zcmptype, "RICE_1") || !strcasecmp(zcmptype, "RICE_ONE")) {
    168168    if (!gfits_modify (theader, "ZNAME1", "%s", 1, "BLOCKSIZE")) ESCAPE;
    169169    if (!gfits_modify (theader, "ZVAL1", "%d", 1, 32)) ESCAPE;
     
    195195    // copy the raw pixels from their native matrix locations to the temporary output buffer
    196196    // for float -> int scaling by zscale, zzero may be applied
    197     if (!strcasecmp (zcmptype, "GZIP_2")) {
     197    if (!strcasecmp (zcmptype, "GZIP_2") || !strcasecmp (zcmptype, "NONE_2")) {
    198198      if (!gfits_collect_gzp2 (matrix, raw, Nraw, raw_bitpix, otile, oblank, ztile, zblank, zscale, zzero)) ESCAPE;
    199199    } else {
     
    240240    // compression modes require swapping after compression (compresssion & decompression
    241241    // operate on native ENDIAN)
    242     if (strcasecmp(zcmptype, "GZIP_1") && strcasecmp(zcmptype, "GZIP_2") && strcasecmp(zcmptype, "RICE_1")) {
     242    if (strcasecmp(zcmptype, "NONE") &&
     243        strcasecmp(zcmptype, "NONE_2") &&
     244        strcasecmp(zcmptype, "GZIP_1") &&
     245        strcasecmp(zcmptype, "GZIP_2") &&
     246        strcasecmp(zcmptype, "RICE_1") &&
     247        strcasecmp(zcmptype, "RICE_ONE")) {
    243248      // Nzdata is number of bytes
    244249      if (!gfits_byteswap_zdata (zdata, Nzdata, cmp_pixsize)) ESCAPE;
Note: See TracChangeset for help on using the changeset viewer.