chillerlan-QRCode-Decoder-ReedSolomonDecoder.html 54 KB

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