Index: trunk/FACT++/src/fitsCompressor.cc
===================================================================
--- trunk/FACT++/src/fitsCompressor.cc	(revision 16808)
+++ trunk/FACT++/src/fitsCompressor.cc	(revision 16809)
@@ -459,6 +459,7 @@
 {
   char     id[4];
+  uint32_t numRows;
   uint64_t size;
-  TileHeader()
+  TileHeader(uint32_t nRows=0, uint64_t s=0)
   {
       id[0]='T';
@@ -466,7 +467,16 @@
       id[2]='L';
       id[3]='E';
-      size=0;
+      numRows=nRows;
+      size=s;
   };
 } __attribute__((__packed__)) TileHeader;
+
+typedef struct BlockHeader
+{
+    uint64_t size;
+    char ordering;
+    unsigned char numProcs;
+    uint16_t procs[];
+} __attribute__((__packed__)) BlockHeader;
 
 template<>
@@ -1285,5 +1295,8 @@
         _catalog[currentCatalogRow][i].first = compressedOffset - _catalog[currentCatalogRow][i].second;
     }
-    memcpy(&(_compressedBuffer[threadIndex][4]), &compressedOffset, sizeof(uint64_t));
+    TileHeader tHead(thisRoundNumRows, compressedOffset);
+//    tHead.numRows = thisRoundNumRows;
+//    tHead.size = compressedOffset;
+    memcpy(_compressedBuffer[threadIndex], &tHead, sizeof(TileHeader));
     return compressedOffset;
 }
@@ -1939,4 +1952,5 @@
 
     //close reconstruction input and output
+//    Do NOT close the verify file, otherwise data cannot be flushed to copy file
 //    verifyFile.close();
     reconstructedFile.close();
