|  3DSoftware.com > Programming > File Formats > FIN > Page 8 |
|
FIN File Format
Page 8
Compression Types ZLIB With ZLIB compression, the scan lines of a tile form a single byte stream that is compressed with the ZLib programming library. The uncompressed byte stream that is fed into ZLib simply consists of one scan line after the other, beginning with the top scan line. There are no extra (pad) bytes between scan lines. JPEG_2000 JPEG_2000 is implemented with Open Jpeg CODEC_J2K or CODEC_JP2. This is a lossy compression method. DIFF_ENC DIFF_ENC is Difference Encoding, which filters data to make it better suited for other types of encoding. With DIFF_ENC, node values are replaced with the difference between each node value and its preceeding node value. The first node is unaltered (the value of its preceeding node is considered to be zero). This method is lossless. To encode a stream of nodes, begin with the last node of the stream, and replace that node value with its value minus the value of the preceeding node. Repeat that process for the second-to-last node in the stream, then for the third-to-last node, etc. (looping backward). When decoding later, loop forward from the beginning of the stream of nodes. Add each difference to the value of the previous node (assume the node before the first node has a value of zero). |
|
|
|
BIAS_ENC BIAS_ENC is Bias Encoding for integers. In this scheme, each tile channel has a bias value, which is the minimum integer value for that tile channel. The value of each grid node within that tile channel becomes a positive offset from that bias. For example, assume all integer values in a tile channel are in the range BIAS_ENC encoding creates a BIAS_ENC stream consisting of an unsigned int |
|
|
|
DYN_RAN
DYN_RAN is Dynamic Range Encoding which converts The tie points consists of two ANSI/IEEE floating point numbers, which are called doubles and are For example, if the doubles are 100.0 and 500.0, and the unsigned ints are 1 and 5, then the number 200.0 will be converted to 2. Another example: If the tie points are |
|
|
|
PRE_STRIP
This method removes (strips) nibbles from the beginning of each node. The most significant nibbles are removed from each node. The nodes must be integers. The same number of nibbles are removed from each node of the stream of nodes. This method is lossles if the value of all removed nibbles is 0x0. If the previous compression stage was BIAS_ENC, the first If the previous compression stage was DYN_RAN, the first PRE_STRIP processing creates a PRE_STRIP stream beginning with an unsigned int (32-bit number) that specifies how many nibbles were stripped, which is immediately followed with a nibble stream of the processed grid nodes padded (if necessary) to make the stream an even number of nibbles. POST_STRIP This method removes (strips) nibbles from the end of each node. The least significant nibbles are removed from each node. The nodes must be integers or FloatBin numbers. If the nodes are FloatBin numbers, the trailing nibbles of each node are significand nibbles, and the number of nibbles removed should not exceed the number of significand nibbles. The same number of nibbles are removed from each node of the stream of nodes. This method is lossles if the value of all removed nibbles is 0x0. If the previous compression stage was BIAS_ENC, the first If the previous compression stage was DYN_RAN, the first POST_STRIP processing creates a POST_STRIP stream beginning with an unsigned int (32-bit number) that specifies how many nibbles were stripped, which is immediately followed with a nibble stream of the processed grid nodes padded (if necessary) to make the stream an even number of nibbles. |
| Page 8 | ||||||
|
|
Copyright © 2008 by 3D Software. All rights reserved. 3D Software, P.O. Box 221190, Sacramento CA 95822 USA www.3DSoftware.com Contact us |
| Tuesday, 06-Jan-2009 01:13:18 GMT |