Index: /branches/eam_branches/ohana.20150429/src/libfits/table/F_compress_T.c
===================================================================
--- /branches/eam_branches/ohana.20150429/src/libfits/table/F_compress_T.c	(revision 38342)
+++ /branches/eam_branches/ohana.20150429/src/libfits/table/F_compress_T.c	(revision 38343)
@@ -154,4 +154,8 @@
       
       int Nraw = Nrows*fields[j].Nvalues; // number of pixels
+      if (!strcmp(fields[j].zctype, "GZIP_1")) {
+	if (!gfits_byteswap_zdata (raw, Nraw, fields[j].pixsize)) ESCAPE(A);
+      }
+
       int Nzdata = Nzdata_alloc; // available space, replaced with actual output size on compression
       if (!gfits_compress_data (zdata, &Nzdata, fields[j].zctype, NULL, NULL, 0, raw, Nraw, fields[j].pixsize)) ESCAPE(A);
Index: /branches/eam_branches/ohana.20150429/src/libfits/table/F_uncompress_T.c
===================================================================
--- /branches/eam_branches/ohana.20150429/src/libfits/table/F_uncompress_T.c	(revision 38342)
+++ /branches/eam_branches/ohana.20150429/src/libfits/table/F_uncompress_T.c	(revision 38343)
@@ -124,4 +124,9 @@
       if (!gfits_uncompress_data (zdata, Nzdata, fields[i].zctype, NULL, NULL, 0, raw, &Nraw, fields[i].pixsize)) ESCAPE(A);
 
+      if (!strcasecmp(fields[i].zctype, "GZIP_1")) {
+	myAssert ((fields[i].zdef.format != 'C') && (fields[i].zdef.format != 'M'), "swap is probably wrong for C or M columns");
+	if (!gfits_byteswap_zdata (raw, Nraw, fields[i].pixsize)) ESCAPE(A);
+      }
+
       off_t row_start = row*ztilelen; 
       // ^- first row for this tile & field
Index: /branches/eam_branches/ohana.20150429/src/libfits/test/compress.sh
===================================================================
--- /branches/eam_branches/ohana.20150429/src/libfits/test/compress.sh	(revision 38342)
+++ /branches/eam_branches/ohana.20150429/src/libfits/test/compress.sh	(revision 38343)
@@ -119,5 +119,5 @@
  delete -q x
 
- $NPT = 10
+ $NPT = 1000
  create x 0 $NPT
 
@@ -177,5 +177,5 @@
  delete -q x y z 
 
- $NPT = 10
+ $NPT = 1000
  create x 0 $NPT
  set y = x^2
