Overview
Netscape Buffering Application Extension defines the the number of image data bytes to be loaded by browser or other GIF viewer before it can start displaying a GIF image. In other words, this is the minimum application buffer size.
The block is 21 bytes long. First 14 bytes belongs to general Application Extension format, syntax is described in GIF89a Specification, section "26. Application Extension".
Syntax
+---------------+
0 | 0x21 | Extension Label
+---------------+
1 | 0xFF | Application Extension Label
+---------------+
2 | 0x0B | Block Size
+---------------+
3 | |
+- -+
4 | |
+- -+
5 | |
+- -+
6 | |
+- NETSCAPE -+ Application Identifier (8 bytes)
7 | |
+- -+
8 | |
+- -+
9 | |
+- -+
10 | |
+---------------+
11 | |
+- -+
12 | 2.0 | Application Authentication Code (3 bytes)
+- -+
13 | |
+===============+ --+
14 | 0x05 | Sub-block Data Size |
+---------------+ |
15 | 0x02 | Sub-block ID |
+---------------+ |
16 | | |
+- -+ | Application Data Sub-block
17 | | |
+- -+ Buffer Size (4 bytes) |
18 | | |
+- -+ |
19 | | |
+===============+ --+
20 | 0x00 | Block Terminator
+---------------+
Comments
- Extension Label - Defines this block as an extension. This field contains the fixed value 0x21 (33).
- Application Extension Label - Identifies the block as an Application Extension. This field contains the fixed value 0xFF (255).
- Block Size - Number of bytes in this extension block, following
the Block Size field, up to but not including the beginning of the
Application Data. This field contains the fixed value 0x0B (11).
- Application Identifier - Sequence of eight printable ASCII
characters used to identify the application owning the Application
Extension. This field contains the fixed value "NETSCAPE".
- Application Authentication Code - Sequence of three bytes used
to authenticate the Application Identifier. An Application program may
use an algorithm to compute a binary code that uniquely identifies it as
the application owning the Application Extension. This field contains
the fixed value "2.0". Sometimes Application Identifier and Application
Authentication Code fields are referred as one "NETSCAPE2.0" field.
- Sub-block Data Size - Indicates the number of data bytes to
follow. The size of the block does not account for the size byte itself.
This field contains the fixed value 0x05 (5).
- Sub-block ID - Identifies the Netscape Looping Extension. This field contains the fixed value 0x02 (2).
- Buffer Size - Indicates the number of image data bytes to be loaded by browser before it can start displaying a GIF image. This field is an unsigned 4-byte integer in
little-endian (least significant byte first) byte order.
- Block Terminator - This zero-length data block marks the end of
the Application Extension. This field contains the fixed value 0x00 (0).
Example
byte# hexadecimal text comments
(hex)
30D: 21 # Extension
30E: FF # Application Extension
30F 0B # Block Size
310: 4E 45 54 53 43 41 50 45 NETSCAPE # Application Identifier
318: 32 2E 30 2.0 # Application Authentication Code
31B: 05 # Sub-block data size
31C: 02 # Sub-block ID
31D: 00 00 01 00 # Buffer size must be 65536 bytes (0x00010000)
321: 00 # Block Terminator
See also
|
|