chillerlan-QRCode-Decoder-ReedSolomonDecoder.html 54 KB

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