code: private void readCompressedFPRowByNumber( ByteBuffer rowdata, int rn, long[] adrows, RandomAccessFile thefile, int typeBytes )
              throws DataFormatException, IOException {
          int offset = (int) (adrows[rn + 1] - adrows[rn]);
          /*
           * The fact that the file is compressed does not mean that the row is compressed. If the
           * first byte is 0 (49), then the row is compressed, otherwise (first byte = 48) the row has
           * to be read in simple XDR uncompressed format.
           */
          byte[] tmp = new byte[offset - 1];
          thefile.seek(adrows[rn]);
          int firstbyte = (thefile.read() & 0xff);
          if (firstbyte == 49) {
              /* The row is compressed. */
              // thefile.seek((long) adrows[rn] + 1);
              thefile.read(tmp, 0, offset - 1);
              Inflater decompresser = new Inflater();
              decompresser.setInput(tmp, 0, tmp.length);
              decompresser.inflate(rowdata.array());
              decompresser.end();
          } else if (firstbyte == 48) {
              /* The row is NOT compressed */
              // thefile.seek((long) (adrows[rn]));
              // if (thefile.read() == 48)
              // {
              // thefile.seek((long) (adrows[rn] + 1));
              thefile.read(rowdata.array(), 0, offset - 1);
              // }
          }
      }
docs: read a row of data from a compressed floating point map
  
  @param rn
  @param adrows
  @param outFile
  @param typeBytes
  @return the ByteBuffer containing the data
  @throws IOException
  @throws DataFormatException