chillerlan-QRCode-Decoder-ReedSolomonDecoder.html 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/template.js"></script>
  22. <script src="js/search.js"></script>
  23. <script defer src="js/searchIndex.js"></script>
  24. </head>
  25. <body id="top">
  26. <header class="phpdocumentor-header phpdocumentor-section">
  27. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  28. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  29. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  30. <i class="fas fa-bars"></i>
  31. </label>
  32. <section data-search-form class="phpdocumentor-search">
  33. <label>
  34. <span class="visually-hidden">Search for</span>
  35. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  36. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  37. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  38. </svg>
  39. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  40. </label>
  41. </section>
  42. <nav class="phpdocumentor-topnav">
  43. <ul class="phpdocumentor-topnav__menu">
  44. <li class="phpdocumentor-topnav__menu-item -menu">
  45. <a href="https://php-qrcode.readthedocs.io">
  46. <span>
  47. User Manual
  48. </span>
  49. </a>
  50. </li>
  51. <li class="phpdocumentor-topnav__menu-item -social">
  52. <a href="https://github.com/chillerlan/php-qrcode">
  53. <span>
  54. <i class="fab fa-github"></i>
  55. </span>
  56. </a>
  57. </li>
  58. </ul>
  59. </nav>
  60. </header>
  61. <main class="phpdocumentor">
  62. <div class="phpdocumentor-section">
  63. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  64. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  65. Menu
  66. </label>
  67. <aside class="phpdocumentor-column -three phpdocumentor-sidebar">
  68. <section class="phpdocumentor-sidebar__category">
  69. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  70. <h4 class="phpdocumentor-sidebar__root-namespace">
  71. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  72. </h4>
  73. <ul class="phpdocumentor-list">
  74. <li>
  75. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  76. </li>
  77. <li>
  78. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  79. </li>
  80. </ul>
  81. <h4 class="phpdocumentor-sidebar__root-namespace">
  82. <a href="namespaces/output.html" class="">Output</a>
  83. </h4>
  84. </section>
  85. <section class="phpdocumentor-sidebar__category">
  86. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  87. <h4 class="phpdocumentor-sidebar__root-namespace">
  88. <a href="packages/Application.html" class="">Application</a>
  89. </h4>
  90. </section>
  91. <section class="phpdocumentor-sidebar__category">
  92. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  93. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  94. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  95. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  96. </section>
  97. <section class="phpdocumentor-sidebar__category">
  98. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  99. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  100. </section>
  101. </aside>
  102. <div class="phpdocumentor-column -nine phpdocumentor-content">
  103. <section>
  104. <ul class="phpdocumentor-breadcrumbs">
  105. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  106. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  107. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-decoder.html">Decoder</a></li>
  108. </ul>
  109. <article class="phpdocumentor-element -class">
  110. <h2 class="phpdocumentor-content__title">
  111. ReedSolomonDecoder
  112. <div class="phpdocumentor-element__package">
  113. in package
  114. <ul class="phpdocumentor-breadcrumbs">
  115. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  116. </ul>
  117. </div>
  118. </h2>
  119. <div class="phpdocumentor-label-line">
  120. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Final</span><span>Yes</span></div>
  121. </div>
  122. <aside class="phpdocumentor-element-found-in">
  123. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/ReedSolomonDecoder.php"><a href="files/src-decoder-reedsolomondecoder.html"><abbr title="src/Decoder/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  124. :
  125. <span class="phpdocumentor-element-found-in__line">35</span>
  126. </aside>
  127. <p class="phpdocumentor-summary">Implements Reed-Solomon decoding</p>
  128. <section class="phpdocumentor-description"><p>The algorithm will not be explained here, but the following references were helpful
  129. in creating this implementation:</p>
  130. <ul>
  131. <li>Bruce Maggs &quot;Decoding Reed-Solomon Codes&quot; (see discussion of Forney's Formula)
  132. http://www.cs.cmu.edu/afs/cs.cmu.edu/project/pscico-guyb/realworld/www/rs_decode.ps</li>
  133. <li>J.I. Hall. &quot;Chapter 5. Generalized Reed-Solomon Codes&quot; (see discussion of Euclidean algorithm)
  134. https://users.math.msu.edu/users/halljo/classes/codenotes/GRS.pdf</li>
  135. </ul>
  136. <p>Much credit is due to William Rucklidge since portions of this code are an indirect
  137. port of his C++ Reed-Solomon implementation.</p>
  138. </section>
  139. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  140. Tags
  141. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#tags" class="headerlink"><i class="fas fa-link"></i></a>
  142. </h5>
  143. <dl class="phpdocumentor-tag-list">
  144. <dt class="phpdocumentor-tag-list__entry">
  145. <span class="phpdocumentor-tag__name">author</span>
  146. </dt>
  147. <dd class="phpdocumentor-tag-list__definition">
  148. <section class="phpdocumentor-description"><p>Sean Owen</p>
  149. </section>
  150. </dd>
  151. <dt class="phpdocumentor-tag-list__entry">
  152. <span class="phpdocumentor-tag__name">author</span>
  153. </dt>
  154. <dd class="phpdocumentor-tag-list__definition">
  155. <section class="phpdocumentor-description"><p>William Rucklidge</p>
  156. </section>
  157. </dd>
  158. <dt class="phpdocumentor-tag-list__entry">
  159. <span class="phpdocumentor-tag__name">author</span>
  160. </dt>
  161. <dd class="phpdocumentor-tag-list__definition">
  162. <section class="phpdocumentor-description"><p>sanfordsquires</p>
  163. </section>
  164. </dd>
  165. </dl>
  166. <h3 id="toc">
  167. Table of Contents
  168. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  169. </h3>
  170. <h4 id="toc-properties">
  171. Properties
  172. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
  173. </h4>
  174. <dl class="phpdocumentor-table-of-contents">
  175. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  176. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#property_eccLevel">$eccLevel</a>
  177. <span>
  178. &nbsp;: <a href="classes/chillerlan-QRCode-Common-EccLevel.html"><abbr title="\chillerlan\QRCode\Common\EccLevel">EccLevel</abbr></a> </span>
  179. </dt>
  180. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  181. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#property_version">$version</a>
  182. <span>
  183. &nbsp;: <a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a> </span>
  184. </dt>
  185. </dl>
  186. <h4 id="toc-methods">
  187. Methods
  188. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  189. </h4>
  190. <dl class="phpdocumentor-table-of-contents">
  191. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  192. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method___construct">__construct()</a>
  193. <span>
  194. &nbsp;: mixed </span>
  195. </dt>
  196. <dd>ReedSolomonDecoder constructor</dd>
  197. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  198. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_decode">decode()</a>
  199. <span>
  200. &nbsp;: <a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a> </span>
  201. </dt>
  202. <dd>Error-correct and copy data blocks together into a stream of bytes</dd>
  203. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  204. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_correctErrors">correctErrors()</a>
  205. <span>
  206. &nbsp;: array&lt;string|int, mixed&gt; </span>
  207. </dt>
  208. <dd>Given data and error-correction codewords received, possibly corrupted by errors, attempts to
  209. correct the errors in-place using Reed-Solomon error correction.</dd>
  210. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  211. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_decodeWords">decodeWords()</a>
  212. <span>
  213. &nbsp;: array&lt;string|int, int&gt; </span>
  214. </dt>
  215. <dd>Decodes given set of received codewords, which include both data and error-correction
  216. codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place,
  217. in the input.</dd>
  218. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  219. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_deinterleaveRawBytes">deinterleaveRawBytes()</a>
  220. <span>
  221. &nbsp;: array&lt;string|int, mixed&gt; </span>
  222. </dt>
  223. <dd>When QR Codes use multiple data blocks, they are actually interleaved.</dd>
  224. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  225. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_findErrorLocations">findErrorLocations()</a>
  226. <span>
  227. &nbsp;: array&lt;string|int, mixed&gt; </span>
  228. </dt>
  229. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  230. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_findErrorMagnitudes">findErrorMagnitudes()</a>
  231. <span>
  232. &nbsp;: array&lt;string|int, mixed&gt; </span>
  233. </dt>
  234. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  235. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_runEuclideanAlgorithm">runEuclideanAlgorithm()</a>
  236. <span>
  237. &nbsp;: array&lt;string|int, <a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a>&gt; </span>
  238. </dt>
  239. </dl>
  240. <section class="phpdocumentor-properties">
  241. <h3 class="phpdocumentor-elements__header" id="properties">
  242. Properties
  243. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  244. </h3>
  245. <article
  246. class="
  247. phpdocumentor-element
  248. -property
  249. -private
  250. "
  251. >
  252. <h4 class="phpdocumentor-element__name" id="property_eccLevel">
  253. $eccLevel
  254. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#property_eccLevel" class="headerlink"><i class="fas fa-link"></i></a>
  255. <span class="phpdocumentor-element__modifiers">
  256. </span>
  257. </h4>
  258. <aside class="phpdocumentor-element-found-in">
  259. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/ReedSolomonDecoder.php"><a href="files/src-decoder-reedsolomondecoder.html"><abbr title="src/Decoder/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  260. :
  261. <span class="phpdocumentor-element-found-in__line">38</span>
  262. </aside>
  263. <code class="phpdocumentor-code phpdocumentor-signature ">
  264. <span class="phpdocumentor-signature__visibility">private</span>
  265. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Common-EccLevel.html"><abbr title="\chillerlan\QRCode\Common\EccLevel">EccLevel</abbr></a></span>
  266. <span class="phpdocumentor-signature__name">$eccLevel</span>
  267. </code>
  268. </article>
  269. <article
  270. class="
  271. phpdocumentor-element
  272. -property
  273. -private
  274. "
  275. >
  276. <h4 class="phpdocumentor-element__name" id="property_version">
  277. $version
  278. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#property_version" class="headerlink"><i class="fas fa-link"></i></a>
  279. <span class="phpdocumentor-element__modifiers">
  280. </span>
  281. </h4>
  282. <aside class="phpdocumentor-element-found-in">
  283. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/ReedSolomonDecoder.php"><a href="files/src-decoder-reedsolomondecoder.html"><abbr title="src/Decoder/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  284. :
  285. <span class="phpdocumentor-element-found-in__line">37</span>
  286. </aside>
  287. <code class="phpdocumentor-code phpdocumentor-signature ">
  288. <span class="phpdocumentor-signature__visibility">private</span>
  289. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a></span>
  290. <span class="phpdocumentor-signature__name">$version</span>
  291. </code>
  292. </article>
  293. </section>
  294. <section class="phpdocumentor-methods">
  295. <h3 class="phpdocumentor-elements__header" id="methods">
  296. Methods
  297. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  298. </h3>
  299. <article
  300. class="phpdocumentor-element
  301. -method
  302. -public
  303. "
  304. >
  305. <h4 class="phpdocumentor-element__name" id="method___construct">
  306. __construct()
  307. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method___construct" class="headerlink"><i class="fas fa-link"></i></a>
  308. </h4>
  309. <aside class="phpdocumentor-element-found-in">
  310. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/ReedSolomonDecoder.php"><a href="files/src-decoder-reedsolomondecoder.html"><abbr title="src/Decoder/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  311. :
  312. <span class="phpdocumentor-element-found-in__line">43</span>
  313. </aside>
  314. <p class="phpdocumentor-summary">ReedSolomonDecoder constructor</p>
  315. <code class="phpdocumentor-code phpdocumentor-signature ">
  316. <span class="phpdocumentor-signature__visibility">public</span>
  317. <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$version</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-EccLevel.html"><abbr title="\chillerlan\QRCode\Common\EccLevel">EccLevel</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$eccLevel</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
  318. <div class="phpdocumentor-label-line">
  319. </div>
  320. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  321. <dl class="phpdocumentor-argument-list">
  322. <dt class="phpdocumentor-argument-list__entry">
  323. <span class="phpdocumentor-signature__argument__name">$version</span>
  324. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-Version.html"><abbr title="\chillerlan\QRCode\Common\Version">Version</abbr></a></span>
  325. </dt>
  326. <dd class="phpdocumentor-argument-list__definition">
  327. </dd>
  328. <dt class="phpdocumentor-argument-list__entry">
  329. <span class="phpdocumentor-signature__argument__name">$eccLevel</span>
  330. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-EccLevel.html"><abbr title="\chillerlan\QRCode\Common\EccLevel">EccLevel</abbr></a></span>
  331. </dt>
  332. <dd class="phpdocumentor-argument-list__definition">
  333. </dd>
  334. </dl>
  335. </article>
  336. <article
  337. class="phpdocumentor-element
  338. -method
  339. -public
  340. "
  341. >
  342. <h4 class="phpdocumentor-element__name" id="method_decode">
  343. decode()
  344. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_decode" class="headerlink"><i class="fas fa-link"></i></a>
  345. </h4>
  346. <aside class="phpdocumentor-element-found-in">
  347. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/ReedSolomonDecoder.php"><a href="files/src-decoder-reedsolomondecoder.html"><abbr title="src/Decoder/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  348. :
  349. <span class="phpdocumentor-element-found-in__line">51</span>
  350. </aside>
  351. <p class="phpdocumentor-summary">Error-correct and copy data blocks together into a stream of bytes</p>
  352. <code class="phpdocumentor-code phpdocumentor-signature ">
  353. <span class="phpdocumentor-signature__visibility">public</span>
  354. <span class="phpdocumentor-signature__name">decode</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$rawCodewords</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a></span></code>
  355. <div class="phpdocumentor-label-line">
  356. </div>
  357. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  358. <dl class="phpdocumentor-argument-list">
  359. <dt class="phpdocumentor-argument-list__entry">
  360. <span class="phpdocumentor-signature__argument__name">$rawCodewords</span>
  361. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  362. </dt>
  363. <dd class="phpdocumentor-argument-list__definition">
  364. </dd>
  365. </dl>
  366. <section>
  367. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  368. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Common-BitBuffer.html"><abbr title="\chillerlan\QRCode\Common\BitBuffer">BitBuffer</abbr></a></span>
  369. </section>
  370. </article>
  371. <article
  372. class="phpdocumentor-element
  373. -method
  374. -private
  375. "
  376. >
  377. <h4 class="phpdocumentor-element__name" id="method_correctErrors">
  378. correctErrors()
  379. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_correctErrors" class="headerlink"><i class="fas fa-link"></i></a>
  380. </h4>
  381. <aside class="phpdocumentor-element-found-in">
  382. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/ReedSolomonDecoder.php"><a href="files/src-decoder-reedsolomondecoder.html"><abbr title="src/Decoder/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  383. :
  384. <span class="phpdocumentor-element-found-in__line">141</span>
  385. </aside>
  386. <p class="phpdocumentor-summary">Given data and error-correction codewords received, possibly corrupted by errors, attempts to
  387. correct the errors in-place using Reed-Solomon error correction.</p>
  388. <code class="phpdocumentor-code phpdocumentor-signature ">
  389. <span class="phpdocumentor-signature__visibility">private</span>
  390. <span class="phpdocumentor-signature__name">correctErrors</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$codewordBytes</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$numDataCodewords</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  391. <div class="phpdocumentor-label-line">
  392. </div>
  393. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  394. <dl class="phpdocumentor-argument-list">
  395. <dt class="phpdocumentor-argument-list__entry">
  396. <span class="phpdocumentor-signature__argument__name">$codewordBytes</span>
  397. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  398. </dt>
  399. <dd class="phpdocumentor-argument-list__definition">
  400. </dd>
  401. <dt class="phpdocumentor-argument-list__entry">
  402. <span class="phpdocumentor-signature__argument__name">$numDataCodewords</span>
  403. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  404. </dt>
  405. <dd class="phpdocumentor-argument-list__definition">
  406. </dd>
  407. </dl>
  408. <section>
  409. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  410. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  411. </section>
  412. </article>
  413. <article
  414. class="phpdocumentor-element
  415. -method
  416. -private
  417. "
  418. >
  419. <h4 class="phpdocumentor-element__name" id="method_decodeWords">
  420. decodeWords()
  421. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_decodeWords" class="headerlink"><i class="fas fa-link"></i></a>
  422. </h4>
  423. <aside class="phpdocumentor-element-found-in">
  424. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/ReedSolomonDecoder.php"><a href="files/src-decoder-reedsolomondecoder.html"><abbr title="src/Decoder/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  425. :
  426. <span class="phpdocumentor-element-found-in__line">171</span>
  427. </aside>
  428. <p class="phpdocumentor-summary">Decodes given set of received codewords, which include both data and error-correction
  429. codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place,
  430. in the input.</p>
  431. <code class="phpdocumentor-code phpdocumentor-signature ">
  432. <span class="phpdocumentor-signature__visibility">private</span>
  433. <span class="phpdocumentor-signature__name">decodeWords</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$received</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$numEccCodewords</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span></code>
  434. <div class="phpdocumentor-label-line">
  435. </div>
  436. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  437. <dl class="phpdocumentor-argument-list">
  438. <dt class="phpdocumentor-argument-list__entry">
  439. <span class="phpdocumentor-signature__argument__name">$received</span>
  440. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  441. </dt>
  442. <dd class="phpdocumentor-argument-list__definition">
  443. <section class="phpdocumentor-description"><p>data and error-correction codewords</p>
  444. </section>
  445. </dd>
  446. <dt class="phpdocumentor-argument-list__entry">
  447. <span class="phpdocumentor-signature__argument__name">$numEccCodewords</span>
  448. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  449. </dt>
  450. <dd class="phpdocumentor-argument-list__definition">
  451. <section class="phpdocumentor-description"><p>number of error-correction codewords available</p>
  452. </section>
  453. </dd>
  454. </dl>
  455. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  456. Tags
  457. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_decodeWords#tags" class="headerlink"><i class="fas fa-link"></i></a>
  458. </h5>
  459. <dl class="phpdocumentor-tag-list">
  460. <dt class="phpdocumentor-tag-list__entry">
  461. <span class="phpdocumentor-tag__name">throws</span>
  462. </dt>
  463. <dd class="phpdocumentor-tag-list__definition">
  464. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Decoder-QRCodeDecoderException.html"><abbr title="\chillerlan\QRCode\Decoder\QRCodeDecoderException">QRCodeDecoderException</abbr></a></span>
  465. <section class="phpdocumentor-description"><p>if decoding fails for any reason</p>
  466. </section>
  467. </dd>
  468. </dl>
  469. <section>
  470. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  471. <span class="phpdocumentor-signature__response_type">array&lt;string|int, int&gt;</span>
  472. </section>
  473. </article>
  474. <article
  475. class="phpdocumentor-element
  476. -method
  477. -private
  478. "
  479. >
  480. <h4 class="phpdocumentor-element__name" id="method_deinterleaveRawBytes">
  481. deinterleaveRawBytes()
  482. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_deinterleaveRawBytes" class="headerlink"><i class="fas fa-link"></i></a>
  483. </h4>
  484. <aside class="phpdocumentor-element-found-in">
  485. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/ReedSolomonDecoder.php"><a href="files/src-decoder-reedsolomondecoder.html"><abbr title="src/Decoder/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  486. :
  487. <span class="phpdocumentor-element-found-in__line">73</span>
  488. </aside>
  489. <p class="phpdocumentor-summary">When QR Codes use multiple data blocks, they are actually interleaved.</p>
  490. <code class="phpdocumentor-code phpdocumentor-signature ">
  491. <span class="phpdocumentor-signature__visibility">private</span>
  492. <span class="phpdocumentor-signature__name">deinterleaveRawBytes</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$rawCodewords</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  493. <div class="phpdocumentor-label-line">
  494. </div>
  495. <section class="phpdocumentor-description"><p>That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This
  496. method will separate the data into original blocks.</p>
  497. </section>
  498. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  499. <dl class="phpdocumentor-argument-list">
  500. <dt class="phpdocumentor-argument-list__entry">
  501. <span class="phpdocumentor-signature__argument__name">$rawCodewords</span>
  502. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  503. </dt>
  504. <dd class="phpdocumentor-argument-list__definition">
  505. </dd>
  506. </dl>
  507. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  508. Tags
  509. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_deinterleaveRawBytes#tags" class="headerlink"><i class="fas fa-link"></i></a>
  510. </h5>
  511. <dl class="phpdocumentor-tag-list">
  512. <dt class="phpdocumentor-tag-list__entry">
  513. <span class="phpdocumentor-tag__name">throws</span>
  514. </dt>
  515. <dd class="phpdocumentor-tag-list__definition">
  516. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Decoder-QRCodeDecoderException.html"><abbr title="\chillerlan\QRCode\Decoder\QRCodeDecoderException">QRCodeDecoderException</abbr></a></span>
  517. </dd>
  518. </dl>
  519. <section>
  520. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  521. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  522. </section>
  523. </article>
  524. <article
  525. class="phpdocumentor-element
  526. -method
  527. -private
  528. "
  529. >
  530. <h4 class="phpdocumentor-element__name" id="method_findErrorLocations">
  531. findErrorLocations()
  532. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_findErrorLocations" class="headerlink"><i class="fas fa-link"></i></a>
  533. </h4>
  534. <aside class="phpdocumentor-element-found-in">
  535. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/ReedSolomonDecoder.php"><a href="files/src-decoder-reedsolomondecoder.html"><abbr title="src/Decoder/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  536. :
  537. <span class="phpdocumentor-element-found-in__line">260</span>
  538. </aside>
  539. <code class="phpdocumentor-code phpdocumentor-signature ">
  540. <span class="phpdocumentor-signature__visibility">private</span>
  541. <span class="phpdocumentor-signature__name">findErrorLocations</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$errorLocator</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  542. <div class="phpdocumentor-label-line">
  543. </div>
  544. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  545. <dl class="phpdocumentor-argument-list">
  546. <dt class="phpdocumentor-argument-list__entry">
  547. <span class="phpdocumentor-signature__argument__name">$errorLocator</span>
  548. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a></span>
  549. </dt>
  550. <dd class="phpdocumentor-argument-list__definition">
  551. </dd>
  552. </dl>
  553. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  554. Tags
  555. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_findErrorLocations#tags" class="headerlink"><i class="fas fa-link"></i></a>
  556. </h5>
  557. <dl class="phpdocumentor-tag-list">
  558. <dt class="phpdocumentor-tag-list__entry">
  559. <span class="phpdocumentor-tag__name">throws</span>
  560. </dt>
  561. <dd class="phpdocumentor-tag-list__definition">
  562. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Decoder-QRCodeDecoderException.html"><abbr title="\chillerlan\QRCode\Decoder\QRCodeDecoderException">QRCodeDecoderException</abbr></a></span>
  563. </dd>
  564. </dl>
  565. <section>
  566. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  567. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  568. </section>
  569. </article>
  570. <article
  571. class="phpdocumentor-element
  572. -method
  573. -private
  574. "
  575. >
  576. <h4 class="phpdocumentor-element__name" id="method_findErrorMagnitudes">
  577. findErrorMagnitudes()
  578. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_findErrorMagnitudes" class="headerlink"><i class="fas fa-link"></i></a>
  579. </h4>
  580. <aside class="phpdocumentor-element-found-in">
  581. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/ReedSolomonDecoder.php"><a href="files/src-decoder-reedsolomondecoder.html"><abbr title="src/Decoder/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  582. :
  583. <span class="phpdocumentor-element-found-in__line">288</span>
  584. </aside>
  585. <code class="phpdocumentor-code phpdocumentor-signature ">
  586. <span class="phpdocumentor-signature__visibility">private</span>
  587. <span class="phpdocumentor-signature__name">findErrorMagnitudes</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$errorEvaluator</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$errorLocations</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  588. <div class="phpdocumentor-label-line">
  589. </div>
  590. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  591. <dl class="phpdocumentor-argument-list">
  592. <dt class="phpdocumentor-argument-list__entry">
  593. <span class="phpdocumentor-signature__argument__name">$errorEvaluator</span>
  594. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a></span>
  595. </dt>
  596. <dd class="phpdocumentor-argument-list__definition">
  597. </dd>
  598. <dt class="phpdocumentor-argument-list__entry">
  599. <span class="phpdocumentor-signature__argument__name">$errorLocations</span>
  600. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  601. </dt>
  602. <dd class="phpdocumentor-argument-list__definition">
  603. </dd>
  604. </dl>
  605. <section>
  606. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  607. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  608. </section>
  609. </article>
  610. <article
  611. class="phpdocumentor-element
  612. -method
  613. -private
  614. "
  615. >
  616. <h4 class="phpdocumentor-element__name" id="method_runEuclideanAlgorithm">
  617. runEuclideanAlgorithm()
  618. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_runEuclideanAlgorithm" class="headerlink"><i class="fas fa-link"></i></a>
  619. </h4>
  620. <aside class="phpdocumentor-element-found-in">
  621. <abbr class="phpdocumentor-element-found-in__file" title="src/Decoder/ReedSolomonDecoder.php"><a href="files/src-decoder-reedsolomondecoder.html"><abbr title="src/Decoder/ReedSolomonDecoder.php">ReedSolomonDecoder.php</abbr></a></abbr>
  622. :
  623. <span class="phpdocumentor-element-found-in__line">216</span>
  624. </aside>
  625. <code class="phpdocumentor-code phpdocumentor-signature ">
  626. <span class="phpdocumentor-signature__visibility">private</span>
  627. <span class="phpdocumentor-signature__name">runEuclideanAlgorithm</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$a</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$b</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$z</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, <a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a>&gt;</span></code>
  628. <div class="phpdocumentor-label-line">
  629. </div>
  630. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  631. <dl class="phpdocumentor-argument-list">
  632. <dt class="phpdocumentor-argument-list__entry">
  633. <span class="phpdocumentor-signature__argument__name">$a</span>
  634. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a></span>
  635. </dt>
  636. <dd class="phpdocumentor-argument-list__definition">
  637. </dd>
  638. <dt class="phpdocumentor-argument-list__entry">
  639. <span class="phpdocumentor-signature__argument__name">$b</span>
  640. : <span class="phpdocumentor-signature__argument__return-type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a></span>
  641. </dt>
  642. <dd class="phpdocumentor-argument-list__definition">
  643. </dd>
  644. <dt class="phpdocumentor-argument-list__entry">
  645. <span class="phpdocumentor-signature__argument__name">$z</span>
  646. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  647. </dt>
  648. <dd class="phpdocumentor-argument-list__definition">
  649. </dd>
  650. </dl>
  651. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  652. Tags
  653. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_runEuclideanAlgorithm#tags" class="headerlink"><i class="fas fa-link"></i></a>
  654. </h5>
  655. <dl class="phpdocumentor-tag-list">
  656. <dt class="phpdocumentor-tag-list__entry">
  657. <span class="phpdocumentor-tag__name">throws</span>
  658. </dt>
  659. <dd class="phpdocumentor-tag-list__definition">
  660. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-Decoder-QRCodeDecoderException.html"><abbr title="\chillerlan\QRCode\Decoder\QRCodeDecoderException">QRCodeDecoderException</abbr></a></span>
  661. </dd>
  662. </dl>
  663. <section>
  664. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  665. <span class="phpdocumentor-signature__response_type">array&lt;string|int, <a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a>&gt;</span>
  666. &mdash;
  667. <section class="phpdocumentor-description"><p>[sigma, omega]</p>
  668. </section>
  669. </section>
  670. </article>
  671. </section>
  672. <div class="phpdocumentor-modal" id="source-view">
  673. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  674. <div class="phpdocumentor-modal-container">
  675. <div class="phpdocumentor-modal-content">
  676. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Decoder/ReedSolomonDecoder.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  677. </div>
  678. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  679. </div>
  680. </div>
  681. <script type="text/javascript">
  682. (function () {
  683. function loadExternalCodeSnippet(el, url, line) {
  684. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  685. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  686. const language = 'php';
  687. const code = document.createElement('code');
  688. code.className = 'language-' + language;
  689. pre.textContent = '';
  690. pre.setAttribute('data-line', line)
  691. code.textContent = 'Loading…';
  692. pre.appendChild(code);
  693. var xhr = new XMLHttpRequest();
  694. xhr.open('GET', src, true);
  695. xhr.onreadystatechange = function () {
  696. if (xhr.readyState !== 4) {
  697. return;
  698. }
  699. if (xhr.status < 400 && xhr.responseText) {
  700. code.textContent = xhr.responseText;
  701. Prism.highlightElement(code);
  702. return;
  703. }
  704. if (xhr.status === 404) {
  705. code.textContent = '✖ Error: File could not be found';
  706. return;
  707. }
  708. if (xhr.status >= 400) {
  709. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  710. return;
  711. }
  712. code.textContent = '✖ Error: An unknown error occurred';
  713. };
  714. xhr.send(null);
  715. });
  716. }
  717. const modalButtons = document.querySelectorAll("[data-modal]");
  718. const openedAsLocalFile = window.location.protocol === 'file:';
  719. if (modalButtons.length > 0 && openedAsLocalFile) {
  720. console.warn(
  721. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  722. 'browsers block XHR requests when a page is opened this way'
  723. );
  724. }
  725. modalButtons.forEach(function (trigger) {
  726. if (openedAsLocalFile) {
  727. trigger.setAttribute("hidden", "hidden");
  728. }
  729. trigger.addEventListener("click", function (event) {
  730. event.preventDefault();
  731. const modal = document.getElementById(trigger.dataset.modal);
  732. if (!modal) {
  733. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  734. return;
  735. }
  736. modal.classList.add("phpdocumentor-modal__open");
  737. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  738. const exits = modal.querySelectorAll("[data-exit-button]");
  739. exits.forEach(function (exit) {
  740. exit.addEventListener("click", function (event) {
  741. event.preventDefault();
  742. modal.classList.remove("phpdocumentor-modal__open");
  743. });
  744. });
  745. });
  746. });
  747. })();
  748. </script>
  749. </article>
  750. </section>
  751. <section class="phpdocumentor-on-this-page__sidebar">
  752. <section class="phpdocumentor-on-this-page__content">
  753. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  754. <ul class="phpdocumentor-list -clean">
  755. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  756. <li>
  757. <ul class="phpdocumentor-list -clean">
  758. <li><a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#toc-properties">Properties</a></li>
  759. <li><a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#toc-methods">Methods</a></li>
  760. </ul>
  761. </li>
  762. <li class="phpdocumentor-on-this-page-section__title">Properties</li>
  763. <li>
  764. <ul class="phpdocumentor-list -clean">
  765. <li><a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#property_eccLevel">$eccLevel<a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html"></li>
  766. <li><a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#property_version">$version<a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html"></li>
  767. </ul>
  768. </li>
  769. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  770. <li>
  771. <ul class="phpdocumentor-list -clean">
  772. <li><a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method___construct">__construct()</a></li>
  773. <li><a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_decode">decode()</a></li>
  774. <li><a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_correctErrors">correctErrors()</a></li>
  775. <li><a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_decodeWords">decodeWords()</a></li>
  776. <li><a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_deinterleaveRawBytes">deinterleaveRawBytes()</a></li>
  777. <li><a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_findErrorLocations">findErrorLocations()</a></li>
  778. <li><a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_findErrorMagnitudes">findErrorMagnitudes()</a></li>
  779. <li><a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#method_runEuclideanAlgorithm">runEuclideanAlgorithm()</a></li>
  780. </ul>
  781. </li>
  782. </ul>
  783. </section>
  784. </section>
  785. </div>
  786. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  787. <section class="phpdocumentor-search-results__dialog">
  788. <header class="phpdocumentor-search-results__header">
  789. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  790. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  791. </header>
  792. <section class="phpdocumentor-search-results__body">
  793. <ul class="phpdocumentor-search-results__entries"></ul>
  794. </section>
  795. </section>
  796. </section>
  797. </div>
  798. <a href="classes/chillerlan-QRCode-Decoder-ReedSolomonDecoder.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  799. </main>
  800. <script>
  801. cssVars({});
  802. </script>
  803. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  804. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  805. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  806. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  807. </body>
  808. </html>