- Timestamp:
- May 28, 2015, 8:27:00 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20150429/src/libfits/matrix/F_uncompress_data.c
r23815 r38329 26 26 int gfits_uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen); 27 27 28 static int pass = 0; 29 28 30 int gfits_uncompress_data (char *zdata, int Nzdata, char *cmptype, char **optname, char **optvalue, int Nopt, char *outdata, int *Nout, int out_pixsize) { 29 31 … … 36 38 37 39 // for GZIP data, I need to check for and remove the header on the first block: 38 gfits_gz_stripheader ((unsigned char *)zdata, &Nzdata); 40 // XXX maybe not anymore 41 // gfits_gz_stripheader ((unsigned char *)zdata, &Nzdata); 42 43 if (pass == 0) { 44 int i; 45 for (i = 0; i < 32; i++) { 46 fprintf (stderr, "0x%02hhx ", zdata[i]); 47 } 48 fprintf (stderr, "\n"); 49 pass = 1; 50 } 39 51 40 52 // uncompress does not require us to know the expected number of pixel; it tells us the number 53 // XXX shouldn't we validate the result : we think we know the size 41 54 status = gfits_uncompress ((Bytef *) outdata, &tNout, (Bytef *) zdata, Nzdata); 42 55 if (status != Z_OK) { … … 47 60 48 61 // the resulting uncompressed data is byteswapped 49 if (!gfits_byteswap_zdata (outdata, *Nout, out_pixsize)) return (FALSE);62 // if (!gfits_byteswap_zdata (outdata, *Nout, out_pixsize)) return (FALSE); 50 63 51 64 return (TRUE);
Note:
See TracChangeset
for help on using the changeset viewer.
