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/table/F_uncompress_T.c

    r38335 r38340  
    9898
    9999  // allocate the intermediate storage buffers
    100   ALLOCATE (raw,   char, max_width*ztilelen);
     100  int Nraw_alloc = max_width*ztilelen + 100;
     101  ALLOCATE (raw,   char, Nraw_alloc);
    101102  ALLOCATE (zdata, char, max_width*ztilelen);
    102103
     
    120121   
    121122      int Nrows = (row == Ntile - 1) ? ztilelast : ztilelen;
    122       int Nraw = Nrows*fields[i].Nvalues; // number of pixels
    123 
     123      int Nraw = Nraw_alloc; // expected number of pixel: Nrows*fields[i].Nvalues
    124124      if (!gfits_uncompress_data (zdata, Nzdata, fields[i].zctype, NULL, NULL, 0, raw, &Nraw, fields[i].pixsize)) ESCAPE(A);
    125125
Note: See TracChangeset for help on using the changeset viewer.