⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc798.txt

📁 RFC 相关的技术文档
💻 TXT
📖 第 1 页 / 共 3 页
字号:
      We are in state  1 (WB)  and the black run length word length is 2      and the white  length  is 3.   We get these  initial values either      from the block header,  or by remembering  them from the  previous      transitions  if this is not the start  of the block.  According to      our rules, we would parse this string as follows:         1(1) 1011 11 000 1(0) 0100 100 1(0) 0(0) 010(1) 1000...      The numbers  in parentheses  are numbers  that were read  but  not      "consumed",  thus the next number  in the sequence  is the same as      the one in parentheses.   First,  we see a 1 and that the next bit      is a 1,  this  means  that we go to WB.  Then we have a 1011 which      means  to go to BB.   Then we do a run, we have a 11 followed by a      000 which  means the black run length gets incremented by 1 (it is      now 3)  and we get 3 MORE  BB's.   Now we have  a 1 followed  by 0      which  means  go to BW.   Next a 0100 which is WW.  Then we have a      run, 100, which means four more WW's.  We keep going like this and      we get the original  bit pattern  given  in the first  example  of      section III.      It is important  to always  start fresh  when  dealing  with  each      block.   There  are many reasons  for this.   The  first  is  that      sometimes blocks are dropped, and you can recover from this if you      resynchronize  at the start of each block.  Also, if at the end of      the previous  block, there is about to be a transition, instead of      making  it at the beginning  of the next block,  the  fax  machine      gives  the new state in the header of the next block and goes from      there.   Thus it is important to always start at whatever state is      given  in the header,  and to align  yourself  at  the  current  X      position given there also.      Sometimes,  while decoding a block, a bit pattern will occur which[page 12]                                                   Alan R. KatzRFC 798                                          DECODING FACSIMILE DATA                                               V. The Decoding Algorithm      does not correspond  to any transition.  If this happens, the rest      of the block may be bad and should be discarded.      The decoding  program decodes the fax data block by block until it      comes to an END command in the data, or runs out of data.VI.  Program Performance   The L10 NLS program takes about two CPU minutes to run on TOPS20 on a   DEC KL10 to decode the average document in fine detail mode.  In this   mode,  the picture  is about  1726 by 2100 pels,  and takes about 204   disk pages to store.   We have a program  which displays bit maps on an HP graphics terminal   and have been able to display  portions of documents.  (not all of an   8.5"  by 11"  document  will fit in the display).   We  can  use  the   terminal's  zoom capability  to look at very small  portions  of  the   document.Alan R. Katz                                                   [page 13]                                                                        DECODING FACSIMILE DATA                                          RFC 798References                                                              References   [1]  Weber,  D.  R.,  "An Adaptive  Run Length  Encoding  Algorithm",   International   Conference   on  Communications,  ICC-75,  IEEE,  San   Francisco, California, June 1975.   [2]   Mills,   D.   L.,   "Rapicom   450  Facsimile  Data  Decoding",   WP2097/MD33E, COMSAT Laboratories, Washington D.C., undated.   [3]  Casner,  S.  L.,   "Faxie",   ISI Internal Memo, USC/Information   Sciences Institute, February 1980.   [4]  Postel,  Jon,  "Rapicom  450 Facsimile  File Format",  RFC  769,   USC/Information Sciences Institute, September 1980.[page 14]                                                   Alan R. KatzRFC 798                                          DECODING FACSIMILE DATA                                                                AppendixAppendix   In this appendix  is given  the first portion of the data which comes   from the fax machine,  this same data in RFC 769 format,  and some of   this data decoded  into a bitmap.   The data is represented  in octal   octets.   The following  is data of the form which comes out of the fax machine   with length and command octets added:      114  70 142 171 330  13 377 377 377 371  53 200   0   5 125 125      125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125      125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125      125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125      125 125 125 125 125 125 125 125 125 121  21 261 114  71 142 171      330  40   0 102 326 270 152  42  42  44 111   0  42 151 267 122      366 110 237 102 211 365 111 171 336  51 244 247 377 377 111 362      177 377 377 377 377 377 377 377 377 376 104 213 241  41 111 377      111 337 377 377 377 377 377 377 377 377 377 377 377 163 301 361      377 377 377 377 360 177  12   0 114  71 142 171 330 141 137 177      377 344  10   0 160  23 301 160 137 376 204 352 135  27 353 264        0  70 100   7  20  75   0   0   0   0   0 344   0   0   0   0        0   0   0   0  34 275   0   0   0   0   0   0   0   0   0   0        0   0   0   0   7  41 310  34 200   0   0 344   0   0   0  71       13 331 204   0 114  71 142 171 330 241 137  26 302 160   0  16      100  71   0 370 270 271   0 162   0  71 174 134 100 162   0  34      234 200 344   7 156 100   1 310  16 107  43 323 263 220 365 313      327  57 377 325 331  36  56  47 325 324 344   3 227  40  71  35      200   1 310   1 313 220   0   0   7 241 330   0   0 137 342 200      114  71 142 171 330 340  77  40 142 160   0   0   0   0 162  71       73 162 376 276 234 277 376  67 265 301  16  20 171   1 311 313      346 377 321  75 256 113 245 377 262 160 136 247  13 251 350 374      270 236 235 217 136 203 220  75 166 166 364 177 305 366  72 107       63 330 352 345 313 320  71  34 270  46  57   0   The following is the same data after put into RFC 769 format (with   each data octet reversed and complemented):      114  70 271 141 344  57   0   0   0 140  53 376 377 137 125 125      125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125      125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125      125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125      125 125 125 125 125 125 125 125 125 165 167 162 114  71 271 141      344 373 377 275 224 342 251 273 273 333 155 377 273 151  22 265      220 355   6 275 156 120 155 141 204 153 332  32   0   0 155 260        1   0   0   0   0   0   0   0   0 200 335  56 172 173 155   0Alan R. Katz                                                   [page 15]                                                                        DECODING FACSIMILE DATA                                          RFC 798Appendix                                                                      155   4   0   0   0   0   0   0   0   0   0   0   0  61 174 160        0   0   0   0 360   1 257 377 114  71 271 141 344 171   5   1        0 330 357 377 361  67 174 361   5 200 336 250 105  27  50 322      377 343 375  37 367 103 377 377 377 377 377 330 377 377 377 377      377 377 377 377 307 102 377 377 377 377 377 377 377 377 377 377      377 377 377 377  37 173 354 307 376 377 377 330 377 377 377 143       57 144 336 377 114  71 271 141 344 172   5 227 274 361 377 217      375 143 377 340 342 142 377 261 377 143 301 305 375 261 377 307      306 376 330  37 211 375 177 354 217  35  73  64  62 366 120  54       24  13   0 124 144 207 213  33 124 324 330  77  26 373 143 107      376 177 354 177  54 366 377 377  37 172 344 377 377   5 270 376      114  71 271 141 344 370   3 373 271 361 377 377 377 377 261 143       43 261 200 202 306   2 200  23 122 174 217 367 141 177 154  54      230   0 164 103 212  55 132   0 262 361 205  32  57 152 350 300      342 206 106  16 205  76 366 103 221 221 320   1 134 220 243  35       63 344 250 130  54 364 143 307 342 233  13 377   The following is the first part of the expanded bitmap of this data   (there are about 4 scan lines here, or 2 pairs of scan lines):      177 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377      377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377      377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377      377 377 377 377 377 377 367 377 377 377 377 377 377 377 377 377      377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377      377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377      337 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377      377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377      377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377      377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377      377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377      377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377      377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377      377 377 377 377 377 377 377 374   0   4 327 377 377 377 377 377      374 377 356 377 177   0  10   0 201 200   0   0   0   0 100   0        0   0   0   0   0   0   1 140   0   0   0   0   0   0   0   0        0   0   0   0   0   0 204  10   0   0  10   0   0   0 100   0       20  10   7 250   2   0  57 100 100   2 100 100 164   0  20  21       31 310 153 137 377 377 377 377 177  32 176 344   2 200 216   0        4   0 240   0   0  14  70   0   0   0   0   0   2  47 137 336      137 377 377 377 377 375 377 372  20 140  45 376 377 377 377 237      377 276 357 377 377 377 227 345 314 175  63 215 202   6 347 143      377 337 376  70 371 370 352 300 213 373 371 377 377 343  73 334        0 207 315   3  33 111 377 167 337 377   1 323 365 177 377 177      377 374 377 135 377 377 365  67 343  55 377 377 377 377 357 377      377 377 377 377 377 377 203 377 236 175 376 236 337 273 347 377[page 16]                                                   Alan R. KatzRFC 798                                          DECODING FACSIMILE DATA                                                                Appendix      376  77 377 377 377 377 377 377 377 377 377 377 300   0   0   0      200 102 177 377 277 377 377 377 376 377 366 365 173 302  12   0       40 200   0   0   0   4 100   0   0   0   0   0   0   2   5 354        0   0   0   0   0   0   0   0   4   0  10   0   0   0 200  10       40  20   1   0 100   0 140   0  20 210 101 374   3 200 155 304        0   6 100 103 376   0 120 121  31 332 243 177 377 377 377 377      377 233 377 354   0 241 217   1  30   0 240   0   0  12 150 202       40   0   0   0  62  47 157 376 173 373 377 377 377 377 377 377       20 141 321 376 377 377 377 327 377 376 377 377 377 377 237 216      316 375 167 215 202   6 300 143 377 237 374  70 175 330 377 304      255 373 153 377 377 353 377 104   0 267 315 203  13 311 177 377      377 377   1 223 367 377 373 167 377 376  77 137 377 345 165  67       43  51 277 377 277 377 357 377 377 377 373 177 377 377 223 377      366 175 376 234 377 271 347 377 376 157 377 377 377 377 377 377      377 377 377 377 340   0   0   0   0   0 177 377  37 377 377 377      377 376 367 357 272 300   2   0   4   0   0   0   0   0   0   0        0   0   0   0  20   0   1 144   0   0   0   0   0   0   4   4        0   0 100   2 100  10 201  10   0  20  75   0   0  40 142   0        0  74 341 234 103   4 157 300   0   2   0 141 372   0   0  20       30 376  55 277 177 377 377 367 377 371 376 100  15  61  16 200       30   0  40   0   0   0 311 200  24   0   0   0  62  55 377 316      367 347 377 357 377 377 377 377 170 305   5 276 377 377 377 357      377 377 377 377 377 177 377 377 357 177 377  76 207 246 340 147      376 336 356  10  17 320 105 235 275 377 377 373 377 347 335 317       50  77 377 353  75 333 377 377 377 377 363 337 343 277 356 171        7 357  76 216 377 211 207 176 257 217 377 377 367 357 357 277      377 357 377 377 377 375 367 377 377 377 377 375 377 377 356 377      366 377 377 377 377 377 377 377 377 377 377 377 340   0   0   0        0  44 373 377  77 377 377 177 177 377 377 337 376 170 173   0        0   0 100   0   1  10   0   0   0   0   0 200 160   0 223 160      300   0   0   0   0   0   0   6 100 220   0   0 140   4   3  30      121  20 351 300 206  74 167   0  30  64  41 234 172  30 175 300        4  32   4 345 367 200 103  60 177 372 177 233 377 377 377 377      376 125 207 210 233  21 364 361 277   1  50  16 140 120  41 335      377 306 214  10  67 377 373 377 377 377 377 377 377 367 377 377      377 363 277 377 377 377 377 377 267 177 377 377 377 377 377 237      377 377 377  77 377 377 355 373Alan R. Katz                                                   [page 17]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -