GDAL supports reading and writing HF2/HFZ/HF2.GZ heightfield raster datasets.
HF2 is a heightfield format that records difference between consecutive cell values. HF2 files can also optionally be compressed by the gzip algorithm, and so the HF2.GZ files (or HFZ, equivalently) may be significantly smaller than the uncompressed data. The file format enables the user to have control on the desired accuracy through the vertical precision parameter.
GDAL can read and write georeferencing information through extended header blocks.