Alternative University

Computer Science

Raster Image Storage

Higher Precision Extended Range

XRH File Format 2.0

ZFP Compression

If the Compression Type integer of a Channel Block is 0x5A465000020000 (ZFP), a ZFP Compression Stream immediately follows the Compression Type integer, after which the end-of-channel-block marker follows the ZFP Compression Stream.

Figure 1:  Channel Block (image plane) of an XRH 2.0 file, with Compression Type set to 0x5A465000020000, stores a ZFP Compression Stream as the Channel Block Data (yellow in this diagram).

A ZFP Compression Stream stores a ZFP code stream, along with information about the code stream.  ZFP o is a high throughput random access compression method. It could be useful for those purposes, for example variable resolution texturing, after you fist get baseline ZFP working.


ZFP Compression Stream

The ZFP Compression Stream begins with a 4-byte start-of-zfp marker (ASCII string SZF\0), followed with a 64-bit Size integer that stores the Size of the ZFP Compression Stream (including the start-of-zfp marker and this Size integer), followed with a 64-bit Compression Type integer (0x5A465000020000), followed with a 32-bit Sample Stride integer (must equal the Channel Block Sample Stride), followed with a 32-bit integer that stores the Image Width (must equal the File Header Image Width), followed with a 32-bit integer that stores the Image Height (same as File Header Image Height), followed with a 32-bit integer that is Reserved for future use (must be zero), followed with a 64-bit floating point number that specfies the Tolerance (accuracy), followed with a 64-bit Size integer that stores the size of the ZFP code stream, followed with the ZFP code stream, which is followed with the end-of-zfp marker (ASCII string EZF\0) that marks the end of the ZFP Compression Stream.

Figure 2:  ZFP Compression Stream as the Data of a Channel Block.

Note: The ZFP Compression Stream is self-contained and may be used in any file format (not just in an XRH file).

The first four bytes of a ZFP Compression Stream store the value 0x535A4600 (ASCII string SZF\0) which marks the start-of-zfp.

Start of ZFP Stream Marker:  SZF\0

The last 4 bytes of a ZFP Compression Stream store the value 0x455A4600 (ASCII string EZF\0) which marks the end-of-zfp (the last 4 bytes of the ZFP Compression Stream).

End of ZFP Stream Marker:  EZF\0


< Previous: SZMOD Compression    
    Next: Porcupine Compression >
XRH File Format
Page 1 : 
Page 2 : 
Page 3 : 
Page 4 : 
Page 5 : 
Page 6 : 
Page 7 : 
Page 8 : 
Page 9 : 
Page 10 : 
Page 11 : 
Introduction
File Layout & Header
Comments
Custom Properties
Channel Names
Channels
Zebra Compression
SZMOD Compression
ZFP Compression (this page)
Porcupine Compression
Color Transformations

Return to Computer Science

Return to Alternative University

Copyright © 2021 Arc Math Software, All rights reserved
Arc Math Software, P.O. Box 221190, Sacramento CA 95822 USA   Contact
2021–Mar–4  18:14  UTC