chillerlan-QRCode-Decoder-ReedSolomonDecoder.html 54 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064
  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>