1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libkate: Format - header packet type 0x80 - ID header</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">libkate<span id="projectnumber"> 0.4.3</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div><div class="header">
<div class="headertitle"><div class="title">Format - header packet type 0x80 - ID header </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p >The ID header must be the first packet in a Kate stream. It carries information about the stream.</p>
<p >Here is a table description of the format of the ID header:</p>
<pre class="fragment"> * Kate bitstream version 0.3
*
* Default field type: LITTLE ENDIAN unsigned integer
0 1 2 3 |
0 1 2 3 |
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1| Byte
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| packtype | Identifier char[7]: 'kate\0\0\0' | 0-3
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| kate magic continued | 4-7
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| reserved - 0 | version major | version minor | num headers | 8-11
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| text encoding | directionality| reserved - 0 | granule shift | 12-15
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| cw sh | canvas width | ch sh | canvas height | 16-19
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| reserved - 0 | 20-23
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| granule rate numerator | 24-27
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| granule rate denominator | 28-31
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| language (NUL terminated) | 32-35
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| language (continued) | 36-39
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| language (continued) | 40-43
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| language (continued) | 44-47
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| category (NUL terminated) | 48-51
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| category (continued) | 52-55
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| category (continued) | 56-59
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| category (continued) | 60-63
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+</pre><p >and for a description of those fields:</p>
<ul>
<li><code>packtype</code> the packet type for this header - always 0x80</li>
</ul>
<ul>
<li><code>kate</code> <code>magic</code> the 7 byte string "kate\0\0\0", as all other Kate headers</li>
</ul>
<ul>
<li><code>version</code> <code>major</code> the major version number of the bitstream</li>
</ul>
<ul>
<li><code>version</code> <code>minor</code> the minor version number of the bitstream</li>
</ul>
<ul>
<li><code>num</code> <code>headers</code> the number of header packets present in this stream</li>
</ul>
<ul>
<li><code>text</code> <code>encoding</code> the default encoding used by text (usually 0, UTF-8)</li>
</ul>
<ul>
<li><code>directionality</code> the default directionality of the text</li>
</ul>
<ul>
<li><code>granule</code> <code>shift</code> the number of bits in the granule positions reserved for storing the offset part</li>
</ul>
<ul>
<li><code>cw</code> <code>sh</code> (from bitstream 0.2) the number of bits to left shift the <code>canvas</code> <code>width</code> field to compute the original canvas width </li>
<li><code>canvas</code> width (from bitstream 0.2) the number to shift left by <code>cw</code> <code>sh</code> to compute the original canvas width</li>
</ul>
<p>zero is a valid width, and represents an unset width</p>
<ul>
<li><code>ch</code> <code>sh</code> (from bitstream 0.2) the number of bits to left shift the <code>canvas</code> <code>height</code> field to compute the original canvas height </li>
<li><code>canvas</code> height (from bitstream 0.2) the number to shift left by <code>ch</code> <code>sh</code> to compute the original canvas height</li>
</ul>
<p>zero is a valid height, and represents an unset height</p>
<ul>
<li><code>granule</code> <code>rate</code> <code>numerator</code> the numerator of the fraction representing how many granule units represent a second (from bitstream 0.2)</li>
</ul>
<ul>
<li><code>granule</code> <code>rate</code> <code>denominator</code> the denominator of the fraction representing how many granule units represent a second</li>
</ul>
<ul>
<li><code>language</code> the default language of the text in this stream (will be NUL terminated)</li>
</ul>
<p>an empty string is a valid language, and represents an unset language</p>
<ul>
<li><code>category</code> the category of the text in this stream (will be NUL terminated)</li>
</ul>
<p>an empty string is a valid category, and represents an unset category</p>
<p >All fields marked as "reserved - 0" should be set to zero when encoding a stream with this version of the bitstream format. However, if decoding a stream encoded with a version of the bitstream format with the same bitstream major version but a higher bitstream minor version, those fields may be non zero, if they were subsequently allocated to carry additional information. </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
|