{"_id":"@agen/encoding","_rev":"7-894544204be8e221b4541f780b433e7c","name":"@agen/encoding","dist-tags":{"latest":"0.1.6"},"versions":{"0.1.0":{"name":"@agen/encoding","version":"0.1.0","description":"Encoding/decoding streams with async generators","type":"module","keywords":["async","generators","encoding","decoding","parser","utf8"],"homepage":"https://github.com/agenjs/agen-encoding/","license":"BSD-3-Clause","author":{"name":"Mikhail Kotelnikov"},"main":"dist/agen-encoding.js","unpkg":"dist/agen-encoding.min.js","module":"dist/agen-encoding-esm.js","repository":{"type":"git","url":"git+https://github.com/agenjs/agen-encoding.git"},"scripts":{"pretest":"rollup -c","test":"node ./test/index.js && eslint src","prepublishOnly":"rm -rf dist && yarn test","postpublish":"zip -j dist/agen-encoding.zip -- LICENSE README.md dist/*.js"},"sideEffects":false,"devDependencies":{"@rollup/plugin-node-resolve":"^11.1.0","eslint":"7","rollup":"2","rollup-plugin-terser":"7","tape":"4","tape-await":"0.1"},"publishConfig":{"access":"public"},"gitHead":"f5d30086252a6f3879044f741b55c8e8b278ce57","bugs":{"url":"https://github.com/agenjs/agen-encoding/issues"},"_id":"@agen/encoding@0.1.0","_nodeVersion":"15.4.0","_npmVersion":"7.0.15","dist":{"integrity":"sha512-Hp8ijIeTcHhOraRKTuuOVyBEj3867U3jEpvrMUvPKi82TnDn227P8VM+3/tces5+QjOfwe+02lkqb0sKEMAw9w==","shasum":"0fc3cc1a81ac52cf9b95e29ca8bb448f95eaf3be","tarball":"https://registry.npmjs.org/@agen/encoding/-/encoding-0.1.0.tgz","fileCount":16,"unpackedSize":47115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGKu8CRA9TVsSAnZWagAAy2IQAJawGpJsI7iJyd83yxJj\noe+pgw8gL/EXwsXE/H3zcLPK0llC3DZe+yifgQ0A/dJOktRnQm7/8L9OEXsK\nMnWU6muENXJSL9SZwT3F/ZH1dJWdsYSjVyOdq/e/Jfc3D4eYG67zYHrWOTLh\nTllPPbcqbopaPxB6bUEWT3TKN3MvFBQ8KgXJrcIyELE3iKHcwhvpscXikltT\npWUqqisr+YfwcSqrUJfUJzKfKrBJF3LgFVSsaAOcSZB2IxSuooE9WrV3hclh\nsXnx3YZpCCSqCNuFElcHe2iQgC8YFvEe7J89a9gZYuQ8AZNGCtlys5UjTtt7\nG0mDBGCL4DrlCESG6zNe86R8cu+IW9JQPSI9o4Y1nnCdnqQSbRY2e1M6m66V\n1bA/B9fBsjQh5AynmETMvuBk17/JKLLF2IWvigKDw/L9MhoZVNk6FHK1ryBy\nHDIC0GqGL2Pi50Xp2Sh3RHbVk2vSFcOOheCfY/9DKHYLtyQ5M3iHfExXe7xv\n5RuJWx50neBA8NHHuiKNwnRArfZeLdl390HLahTzCQ0feanaCmWSI6PmB+A0\n3f2heQ5woI19PtPh/7KIcDjwiqMz7FvUpqEMNeO4wg9c3uI9BL2yMd9qT3yg\nJ2vKp7ht/JoSvhgl/nE5ggeUX86V4INMNxPAotc6Kr8jP7VQHyyNl2DJhRRd\nZQX4\r\n=rtEz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIYR90etzDIK0ILi1UYwdqDSNGXgfrmGqb/cRCZpBpQAIgAsYhfy4jpqwdKX++vN21KVC1kWN2d5Mi4sCB/tCQbpc="}]},"_npmUser":{"name":"mkotelnikov","email":"mikhail.kotelnikov@gmail.com"},"directories":{},"maintainers":[{"name":"mkotelnikov","email":"mikhail.kotelnikov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/encoding_0.1.0_1612229563942_0.5588691813634943"},"_hasShrinkwrap":false},"0.1.1":{"name":"@agen/encoding","version":"0.1.1","description":"Encoding/decoding streams with async generators","keywords":["async","generators","encoding","decoding","parser","utf8"],"homepage":"https://github.com/agenjs/agen-encoding/","license":"BSD-3-Clause","author":{"name":"Mikhail Kotelnikov"},"main":"dist/agen-encoding.js","unpkg":"dist/agen-encoding.min.js","jsdelivr":"dist/agen-encoding.min.js","module":"dist/agen-encoding-esm.js","repository":{"type":"git","url":"https://github.com/agenjs/agen-encoding.git"},"scripts":{"pretest":"rollup -c","test":"node -r esm ./test/index.js && eslint src","prepublishOnly":"rm -rf dist && yarn test","postpublish":"zip -j dist/agen-encoding.zip -- LICENSE README.md dist/*.js"},"sideEffects":false,"devDependencies":{"@rollup/plugin-node-resolve":"^11.1.0","esm":"^3","eslint":"7","rollup":"2","rollup-plugin-terser":"7","tape":"4","tape-await":"0.1"},"publishConfig":{"access":"public"},"licenseText":"Copyright 2019-2021 Mikhail Kotelnikov\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of the author nor the names of contributors may be used to\n  endorse or promote products derived from this software without specific prior\n  written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","_id":"@agen/encoding@0.1.1","dist":{"shasum":"25af337176c939b6d2746830e762f42084c61149","integrity":"sha512-/fM5kSJ6pCB2LpAkyyFMg5jpg1oqbSwTmqEMXsFkivqpGWEstGy8pOyYq6mg7aZGZSqY+VJiRnjhsFJ07wDmgA==","tarball":"https://registry.npmjs.org/@agen/encoding/-/encoding-0.1.1.tgz","fileCount":19,"unpackedSize":47422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIaCACRA9TVsSAnZWagAAWqQP/0NzI0vUwzRiu+Y4Ix3e\nD2xspxcK4GPrXaihBoU8CF59EC9kzVNElVVUijRP4qH7f3Z2Q6uIdC5/qLcu\nphrrcFiVJWfQECbVHGljTAZRb4ZJADMkr0+P5Gxdd0OI+y1LCqFzQ3N4WIKU\nC4Iaf0mKyWgEoLT8vlInAl13LM3D9yvZsCaFWUcqvCCIZPZemM5G0bYpwmIU\nAoa/e5uEu0S5cPMtYhrGwkGUb6bXZQxazwOzXcoTv/6I7RhcQuCB2Ywex7Mp\nnUFSORNMQoSYTcaczsKHm3zXiU6nbnEMuvZ5Gt8p9/6P1fsR0DXJJjakokk5\n9RArdDxQminbeYoqBO4emO7+buj2ufpTEaibG3T0RFtMIhkprSEnqzqt0Sww\npm+kAEna3h4y6dHoaI9BbPUW6DzrkRFf3TCVDppzfJxn7RTNEndtOQOTuiiy\n8QRwbUZQq8b4CeDUtaYJeXarTG3F3xgQ6lw4xm09iimhluYoiXykr+T+eUWV\n5QNG4dLl8G4Pt87D+EeNuRQsxG9eC6aAgNC7PsPAFpB0xl5MpSc3//f8e0Qb\nOk/5mqo0sVhGY5TAHHOv8hj3SWv4k6+TU62qtqdCRo32MsNqqqBsW7kzhsPk\nTR0oJp1QOmkV+TQGZIK9xajI7QLksc1Ww2VpzzpuCglukSiX/YGT9AjAfIq8\nQ6pD\r\n=wq3k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhTEuVP5q0KZHZhd8glQ9qkguBnkaMpHl28BVvMstrvQIhAKF9xJMu1WjTJLMn0N4U8YW8giTFikG0La62Q+XoJ6Di"}]},"_npmUser":{"name":"mkotelnikov","email":"mikhail.kotelnikov@gmail.com"},"directories":{},"maintainers":[{"name":"mkotelnikov","email":"mikhail.kotelnikov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/encoding_0.1.1_1612816512317_0.8546236024233225"},"_hasShrinkwrap":false},"0.1.2":{"name":"@agen/encoding","version":"0.1.2","description":"Encoding/decoding streams with async generators","keywords":["async","generators","encoding","decoding","parser","utf8"],"homepage":"https://github.com/agenjs/agen-encoding/","license":"BSD-3-Clause","author":{"name":"Mikhail Kotelnikov"},"main":"dist/agen-encoding.js","unpkg":"dist/agen-encoding.min.js","jsdelivr":"dist/agen-encoding.min.js","module":"dist/agen-encoding-esm.js","repository":{"type":"git","url":"https://github.com/agenjs/agen-encoding.git"},"scripts":{"pretest":"rollup -c","test":"node -r esm ./test/index.js && eslint src","prepublishOnly":"rm -rf dist && yarn test","postpublish":"zip -j dist/agen-encoding.zip -- LICENSE README.md dist/*.js"},"sideEffects":false,"devDependencies":{"@rollup/plugin-node-resolve":"^11.1.0","eslint":"7","esm":"^3","rollup":"2","rollup-plugin-terser":"7","tape":"5","tape-await":"0.1"},"publishConfig":{"access":"public"},"licenseText":"Copyright 2019-2021 Mikhail Kotelnikov\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of the author nor the names of contributors may be used to\n  endorse or promote products derived from this software without specific prior\n  written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","_id":"@agen/encoding@0.1.2","dist":{"shasum":"9d67e9794d3a19c8f9d7eecc94a92cdcc5ae05cd","integrity":"sha512-Bdc0i4hdvZpqdiCGDhcs92VhY/z24pQnNYJEbQ2qcvyqgDe77TuKBgMNTWQrPRYil/3i6KKAKqHRgtb8jUvkyA==","tarball":"https://registry.npmjs.org/@agen/encoding/-/encoding-0.1.2.tgz","fileCount":19,"unpackedSize":47422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIaQmCRA9TVsSAnZWagAAoZMQAIUvphPTsCx+7svI5/ms\nnSzJW0uPfa620ziBfjnAbmmGeBD2GP3TtOfWkh6XoNxwbfZZSr5ih4Mw9ubf\ncvdT8xDwTzd6et6b8zZg1+m6XOxOyLm4KYUC2IJjKohMN85UKdmnrdPZtRSW\nlptFRNQIOAn0wAH/KWOsYaFbAPf0wWVCV2Tjpi5fQKD+Gi2SH9Nwnjeirzng\nsgKMxkLRr+IkkMSiBXV71FpgCns+pHq86ARnkWh5t0z03WkoxbGzE8N9bB9c\npCF54iAoHcexCYRMT2unwxhbkrKkyXyoueDGp1QGJF5CvlBj/RyrBrQT4thd\nKFALXiuuaeM/78aeeJs3kbeDIA6eIQHXPjEwRV7esSHn5Dea0cbDxBr5AmrY\nXdSuAPQaGKJ1E8mj7jJ9JsVSkAQ4QVq02onKhhdL3oQ0MOVjTa6/n4Qbe+Xz\nDplisl4MrA3L+ja15Eb8qvmZIp61CQxCvWXCjOMQphQH0uY61mOVCYKp8BHs\nd9uoN1z5/V7XFD8QtApYLDQFVRavZu2isTDNemIZvapNJUL+c46rDANpYFeV\nXOOi785ufs4Hy26SvDqXOZOU/npsAI+Un/BYMJ8wAQ4m604KAumiIx+Tlpat\ndxwGXtSoub8zuC0mfv1DTyB32n6nLu95nmY1GtWQOH2veXvruJOI2EPKCXHq\n6ing\r\n=brP5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCT+5Zidw1ehdPkuQCXiZ8+J0r0yLJjzgHBAIqf3RO34AIhAMKoBasI8sTYzxyW4bRuADoe8x32QSdg/i9NvePokhe+"}]},"_npmUser":{"name":"mkotelnikov","email":"mikhail.kotelnikov@gmail.com"},"directories":{},"maintainers":[{"name":"mkotelnikov","email":"mikhail.kotelnikov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/encoding_0.1.2_1612817446159_0.6807355618609854"},"_hasShrinkwrap":false},"0.1.3":{"name":"@agen/encoding","version":"0.1.3","description":"Encoding/decoding streams with async generators","keywords":["async","generators","encoding","decoding","parser","utf8"],"homepage":"https://github.com/agenjs/agen-encoding/","license":"BSD-3-Clause","author":{"name":"Mikhail Kotelnikov"},"main":"dist/agen-encoding.js","unpkg":"dist/agen-encoding.min.js","jsdelivr":"dist/agen-encoding.min.js","module":"dist/agen-encoding-esm.js","repository":{"type":"git","url":"https://github.com/agenjs/agen-encoding.git"},"scripts":{"pretest":"rollup -c","test":"node -r esm ./test/index.js && eslint src","prepublishOnly":"rm -rf dist && yarn test","postpublish":"zip -j dist/agen-encoding.zip -- LICENSE README.md dist/*.js"},"sideEffects":false,"devDependencies":{"@rollup/plugin-node-resolve":"^11.1.0","eslint":"7","esm":"^3","rollup":"2","rollup-plugin-terser":"7","tape":"5","tape-await":"0.1"},"publishConfig":{"access":"public"},"licenseText":"Copyright 2019-2021 Mikhail Kotelnikov\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of the author nor the names of contributors may be used to\n  endorse or promote products derived from this software without specific prior\n  written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","_id":"@agen/encoding@0.1.3","dist":{"shasum":"f4711f1bdc33dbeb7f85e6724de9696c7d9d0094","integrity":"sha512-rAaQ6bix4GStDhH5bHzh9YOEgTay3z0cCcTNU4MMEww2aK3F2l8TQ3EjgJAwkQaZQgjJEF94vAs5Geu6rIdBFA==","tarball":"https://registry.npmjs.org/@agen/encoding/-/encoding-0.1.3.tgz","fileCount":22,"unpackedSize":52440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgO703CRA9TVsSAnZWagAA9McP/Am/x1b6eZR9i1QDOmMc\nEbYduC0WtVIcAlD6l/t2l+m++gw6ShlCOEPzfYoToUytr/jyNMlByRBy74om\nhHAEZFAVjqVPAv1DTsUWr0tU10PJPG/DL6k7p4CptXOdXeGknXvKN/vM+lEa\nt4Hp38CKX1+iZ4BWJOQJ6qJyfcoGTvgNdQ0QogO8vBxRba9apr5z97w2gHCV\nkjfsJrAS0tKSiEnNC/jY0+X5HZr2FqarqXuxH8E0qjA0MW7NU/PJC4ucbYAv\nz7zpuZ6k7ofL3c1Cy0I0lDov5Bm96InegNZOpQi0knYVk6oy0bO6U3/jMq9E\nf6DkuO/dI78xUyZDR9gQT9P8COHgbqLJMha9ock/pqft+yqfg4PCvDC2tlPt\nE5PIYfjeMme8THuYCusHEZVcDQwe9XmnGJenkO6JFIa7B+3i93JlTcT7ni8Z\n/PkLxFs/VUgzZXQ/n2roolPUt4CJzQp/ko+KT5mJtoWwpyfNZmwhzd73RuxW\nSNsxlk8oILbq3zqciDFvupB6tfVBt4rIw5eV1WBUr29idlmSV1t55Q2IkAO2\nhi0IeoMoXDCsOj5ah+F7S74etwZenBug9id50xUuPlwDPGGZMCEgK9xZnLG/\n57LcMJWeuVZn1sFWEpHNee8AJnj49DeHkUIJy+S/0Wm16cv6kZQ90N9F9I2J\neHx0\r\n=e08f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBG6y4DqG9CI+3PnyhvbamJdT4ryKgVpF8hCfINbP3ZXAiEAlbZTcYY/5m7kyvks0nw4zuZPjU2KKQ/dN45ePIg2t10="}]},"_npmUser":{"name":"mkotelnikov","email":"mikhail.kotelnikov@gmail.com"},"directories":{},"maintainers":[{"name":"mkotelnikov","email":"mikhail.kotelnikov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/encoding_0.1.3_1614527799289_0.901763955045227"},"_hasShrinkwrap":false},"0.1.4":{"name":"@agen/encoding","version":"0.1.4","description":"Encoding/decoding streams with async generators","keywords":["async","generators","encoding","decoding","parser","utf8"],"homepage":"https://github.com/agenjs/agen-encoding/","license":"BSD-3-Clause","author":{"name":"Mikhail Kotelnikov"},"type":"module","main":"dist/agen-encoding.js","unpkg":"dist/agen-encoding.min.js","jsdelivr":"dist/agen-encoding.min.js","module":"dist/agen-encoding-esm.js","exports":{"package.json":"./package.json","import":"./src/index.js","require":"./dist/agen-encoding.js"},"repository":{"type":"git","url":"https://github.com/agenjs/agen-encoding.git"},"scripts":{"pretest":"rollup -c","test":"node ./test/index.js && eslint src","prepublishOnly":"rm -rf dist && yarn test","postpublish":"zip -j dist/agen-encoding.zip -- LICENSE README.md dist/*.js"},"sideEffects":false,"devDependencies":{"@rollup/plugin-node-resolve":"^11.1.0","eslint":"7","esm":"^3","rollup":"2","rollup-plugin-terser":"7","tape":"5","tape-await":"0.1"},"publishConfig":{"access":"public"},"licenseText":"Copyright 2019-2021 Mikhail Kotelnikov\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of the author nor the names of contributors may be used to\n  endorse or promote products derived from this software without specific prior\n  written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","_id":"@agen/encoding@0.1.4","dist":{"shasum":"7e6a4bc7f84b8a16f563fd03ad19eb8fe0cc6930","integrity":"sha512-B2SayK279dUoZQ0cFhUJqV8WaGMEscur9xWnH9jgGyNbSC/dMqEK1h7ZWFiMlgh7h/kliFkQKYPjMXUORslH2w==","tarball":"https://registry.npmjs.org/@agen/encoding/-/encoding-0.1.4.tgz","fileCount":22,"unpackedSize":52584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdDTqCRA9TVsSAnZWagAAayAP/2Y8AEWTh2INuRXl1TM9\nETazA1D0/DwRYq+S0D2b9FQhw3vN1gg6ysudqC9PiK3y3bohyO56qdEQ8iva\nAD/O9q2wy1HRY2hkIZhduZQDRz8vINkarcTsr7667VF+6HbPLdBJFN4UzChX\nyAS8ATM3zQgoYRl8DbRS7oJFrPQEnZMkOsc4egsNv7YXdDKeNpO2DkfDzWgX\nA2T+7ScU4lx7OYruPWq99VVnrbKQ8ApYr6Z9BEOI7W04ga3Yh6B7IkLOGxOw\n7HbAEL1iVdc+U3xIURL1P3HjX3bI93FZ6kyPGclTprfBTTqGM6eH5mqrjOoY\nHBwve8cfAzXwm+OaEtGUaCCrUqDYJj/N2pvfwNceFWcvv5177Kxs890kCItF\np1EpbwkU62BqaZZ1ATe3s3CVbPFqX3wtL5LXAE4g/oHF0j1UnDsFL3i5cPfW\nh6QOwEX+hDX7q0vCH0pGAwrIY5azAABSPM3ngFEIOrsuzdKGjW0VGsS1EBIL\nr+DAXvLtcTAyW5Ee860c2IhmR1n3vJPqiTc6K7S7H3/faKyCFaWwMK9Sy5EO\nGSIukB4iPzC0KmG+YJfimB6AAtXsHtzFiEo3cBqlSKvfhcZK/vA98dCIktbC\nvB5z6kz672vKAa36eBaPMblHLO96J6t3e/LIEqTc0woyisIrDQOuXsGgajBO\nbXv+\r\n=1EDP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF+jIgWpKscQMj5soSa9RgOamDX4+X6dMVmf45uu6F1oAiADaKBIuZ+N2drv6OKxwoBUHte3ACpZJT34+eXzlAh+AA=="}]},"_npmUser":{"name":"mkotelnikov","email":"mikhail.kotelnikov@gmail.com"},"directories":{},"maintainers":[{"name":"mkotelnikov","email":"mikhail.kotelnikov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/encoding_0.1.4_1618228457782_0.6089006385201496"},"_hasShrinkwrap":false},"0.1.5":{"name":"@agen/encoding","version":"0.1.5","description":"Encoding/decoding streams with async generators","keywords":["async","generators","encoding","decoding","parser","utf8"],"homepage":"https://github.com/agenjs/agen-encoding/","license":"BSD-3-Clause","author":{"name":"Mikhail Kotelnikov"},"main":"dist/agen-encoding.js","unpkg":"dist/agen-encoding.min.js","jsdelivr":"dist/agen-encoding.min.js","module":"dist/agen-encoding-esm.js","exports":{"package.json":"./package.json","import":"./src/index.js","require":"./dist/agen-encoding.js"},"repository":{"type":"git","url":"https://github.com/agenjs/agen-encoding.git"},"scripts":{"pretest":"rollup -c","test":"node -r esm ./test/index.js && eslint src","prepublishOnly":"rm -rf dist && yarn test","postpublish":"zip -j dist/agen-encoding.zip -- LICENSE README.md dist/*.js"},"sideEffects":false,"devDependencies":{"@rollup/plugin-node-resolve":"^11.1.0","eslint":"7","esm":"^3","rollup":"2","rollup-plugin-terser":"7","tape":"5","tape-await":"0.1"},"publishConfig":{"access":"public"},"licenseText":"Copyright 2019-2021 Mikhail Kotelnikov\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of the author nor the names of contributors may be used to\n  endorse or promote products derived from this software without specific prior\n  written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","_id":"@agen/encoding@0.1.5","dist":{"shasum":"3557d2f99a50b708faa4eb106f553fe5e9b3d18d","integrity":"sha512-/BtPReetjhmqhDq61hmSKi3jBIUUqhNk+ooaxbKT6Eq/yz2x/hoGamMAYCsK8/G7ALuuNvFWc1JIioCeowgxsw==","tarball":"https://registry.npmjs.org/@agen/encoding/-/encoding-0.1.5.tgz","fileCount":22,"unpackedSize":52571,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkqXWCRA9TVsSAnZWagAAT7cP/0x8J0JNhy9UZqhk4PjO\nYwvllXX9FVhl7FCRjoucEp9rp2wBkFGwwgM8kWxCJZWv9GT4pU2lo9lQMO4n\nCGAcZwlcUML7cJw1HjB2W0T+W1eb4dvxCW0gbV0mzg+fwfgmxZ0riXbgXNob\n587gOjXeks713PWgSbh94q8XcizA8+LijsospjFXawMQ5vgPN7szD7OK9Sez\nfsteUN0RWqc5nzBJmqabHEkDzlQ9W4+7nFNDQUKsI5MPHo++DOpURWDcaHmM\nCi9O21DFvWdquknomR+48MYq3MAshUlZQ2eynny4un/Hv2W83jFLUMT+gqEY\nBxaQI9ORABjuNeuV4wLsPKmWNIDktl9YHg7iMpJXf7N/mVYrIKyKvlAMDl99\nm0Wj20UIM5GbMzV23HE7UnEbpf6vTe8sD85AxLadwM0PPtNFc46IGfD5GQ4L\nlnjTwQ11QL+swbJveYtKYVQPwa5pCwE48cHhRnb1OFWjF9NUDdF6PJvCmngB\nDKtse6xlJL/FWun/9wVfZLrK3Qwe75ZLqwpZNytNZPPbv9WQJ4cOinF/CVOE\nsPUzq61ntz6z/HPo5eOih6ekFM9lfMDxjf8zEHvYMgelFmSRocKvghvQ2mcX\n2A/4CqREq/dYoTx5/CsuNnoKAZD/NtvquJ6/x1GZa6mKTiGssY5AD7rjatX3\nnWNU\r\n=Z8RD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA4bxo1uKRikmbzTsdjDzCXZa6Zt3bUfCtcIT8xYRsiuAiAU06dwyTGIiUhqI4WKUEISD4ZFXrhLakIVQGhNSIygBA=="}]},"_npmUser":{"name":"mkotelnikov","email":"mikhail.kotelnikov@gmail.com"},"directories":{},"maintainers":[{"name":"mkotelnikov","email":"mikhail.kotelnikov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/encoding_0.1.5_1620223445443_0.050155326793928534"},"_hasShrinkwrap":false},"0.1.6":{"name":"@agen/encoding","version":"0.1.6","description":"Encoding/decoding streams with async generators","keywords":["async","generators","encoding","decoding","parser","utf8"],"homepage":"https://github.com/agenjs/agen-encoding/","license":"BSD-3-Clause","author":{"name":"Mikhail Kotelnikov"},"type":"module","main":"dist/cjs/agen-encoding.js","module":"dist/esm/agen-encoding-esm.js","jsdelivr":"dist/cjs/agen-encoding.min.js","unpkg":"dist/cjs/agen-encoding.min.js","exports":{"umd":"./dist/cjs/agen-encoding.min.js","require":"./dist/cjs/agen-encoding.js","default":"./src/index.js"},"repository":{"type":"git","url":"https://github.com/agenjs/agen-encoding.git"},"scripts":{"pretest":"rollup -c","test":"node ./test/index.js && eslint src","prepublishOnly":"rm -rf dist && yarn test","postpublish":"zip -j dist/agen-encoding.zip -- LICENSE README.md dist/*.js"},"sideEffects":false,"devDependencies":{"@rollup/plugin-node-resolve":"13.0.0","eslint":"7","rollup":"2","rollup-plugin-generate-package-json":"3","rollup-plugin-terser":"7","tape":"4","tape-await":"0.1"},"publishConfig":{"access":"public"},"licenseText":"Copyright 2019-2021 Mikhail Kotelnikov\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of the author nor the names of contributors may be used to\n  endorse or promote products derived from this software without specific prior\n  written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","_id":"@agen/encoding@0.1.6","dist":{"shasum":"ddfa29e18ad306914a9c5316a20b38a7cf17f582","integrity":"sha512-O5UB8pTbsBUkq27ynrJCrKWsx4u4mt8J+bCidBhuwEwKvvCDjJS4tP154l8DJn1MstrL+rlciRfudlVn86REAA==","tarball":"https://registry.npmjs.org/@agen/encoding/-/encoding-0.1.6.tgz","fileCount":25,"unpackedSize":52696,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxE/UCRA9TVsSAnZWagAAvtAP/2W+N12zcaVq6hA5kPj/\nVU+opNhXpzuyIE3B8ji5g4s8kpnTQKO6Dr0qrL3AcDMxoziMqDoVawWok5Nh\nVh8RKn5L/8dSO1Lx15xmHDpjVVbST5abFQnYZsDFRAYSt0eiH3MWYpE76kX1\nUEKwEt+/oz15J6X6SP9voHkqVTsFemKGDRRU8uel1uI4WWHMuBbD4bOvBlf2\nsX+z6kOkPupqiJklpibVidGiGT2oAuLM/zSCjwlpbc7BTMprN04D7CUrGcfi\nG1cNIEFOB0EZ9cwowQHCdbNbevEegdnGwIhdxsVEkh3cv9gLXaExGiln6/x4\nBnqaNeMJoXA40Q02apisIA5HrheYQN+ZwUMfoRHZuWss1FewOGAEmKfh/tvK\nr0lkwqAoPNbtxRhr+p5Zr4FvvP5/HLD5hdZ9K+1MDpl6TVNtxl3VSLfW6DHf\nBPZYdKzA+/QVZGmNirIIehLAWGrcay1jJTGdn69eaoqdUZIuY+T5jR10I82w\nkzb124+lDBlGhcE5yXxzHObBqvLQzmz6pi+S1KrykHNKkrQXaVCcjpV1uExo\n0Bp+r0YID4aqnC18hqaiQwDpWntddzXSWYdcwbRP47PWrUHe+Y1aRQxTqFr9\nn1SylocV92++f97xQo7reuUrkeOc/rWkgSUmusxryEn9iz/wMftxbsToRi0W\nxMFQ\r\n=Df6Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBGyOQdwbWZV1CZF9YoCAnTU+1NSMqUs0XetkR7e9LCgIgT8L+tW+i5Lp3bF10SYGOWfLgoQ+t3JdwInFjT4uR3ck="}]},"_npmUser":{"name":"mkotelnikov","email":"mikhail.kotelnikov@gmail.com"},"directories":{},"maintainers":[{"name":"mkotelnikov","email":"mikhail.kotelnikov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/encoding_0.1.6_1623478227818_0.25942572025870647"},"_hasShrinkwrap":false}},"time":{"created":"2021-02-02T01:32:43.758Z","0.1.0":"2021-02-02T01:32:44.109Z","modified":"2022-04-04T11:55:16.693Z","0.1.1":"2021-02-08T20:35:12.448Z","0.1.2":"2021-02-08T20:50:46.266Z","0.1.3":"2021-02-28T15:56:39.407Z","0.1.4":"2021-04-12T11:54:17.972Z","0.1.5":"2021-05-05T14:04:05.543Z","0.1.6":"2021-06-12T06:10:28.006Z"},"maintainers":[{"name":"mkotelnikov","email":"mikhail.kotelnikov@gmail.com"}],"description":"Encoding/decoding streams with async generators","homepage":"https://github.com/agenjs/agen-encoding/","keywords":["async","generators","encoding","decoding","parser","utf8"],"repository":{"type":"git","url":"https://github.com/agenjs/agen-encoding.git"},"author":{"name":"Mikhail Kotelnikov"},"license":"BSD-3-Clause","readme":"@agen/encoding\n==============\n\nThis package contains methods to encode/decode strings using async generators.\n\n* High-level methods:\n  - [encode](#encode-method) encode strings to UTF-8 binary blocks\n  - [decode](#decode-method) decodes binary blocks and returns string chunks\n  - [lines](#lines-method) decodes binary stream and returns individual lines;\n    returned lines have the trailing `\"\\n\"` symbol.\n* Main methods for encoding / decoding messages. These methods provide \n  detailed information about exact positions of returned blocks in the stream:\n  - [encodeBlocks](#encodeBlocks-method) encodes strings to UTF-8 binary blocks\n    and returns byte position and length of the encoded chunks\n  - [decodeBlocks](#decodeBlocks-method) decodes binary blocks and returns \n    decoded strings with their byte-level positions in the original stream\n  - [decodeLines](#decodeLines-method) decodes individual lines and returns \n    their position in the stream; returned lines have the trailing `\"\\n\"` symbol\n* Low-level functions accepting one character / one byte and performing encoding / decoding\n  at the byte level:\n  - [newEncoder](#newEncoder-method) encodes individual characters\n  - [newDecoder](#newDecoder-method) decodes individual bytes\n\n`encode` method\n---------------\n\nEncodes strings to UTF-8 binary blocks.\nParamters:\n- `blockSize` - maximal length of encoded binary chunks\n- `onBlock` - an optional method recieves the full position information \n  of returned blocks; this method is called just before the block is \n  returned by the iterator.\n  Structure of the information object:\n  - `data` - a byte sequence encoding a string chunk\n  - `charIdx` - position of the first encoded character in the initial stream\n  - `charLen` - length of the encoded block of characters\n  - `byteIdx` - byte position of the encoded block in the resulting binary stream\n  - `byteLen` - length of the encoded data block (equals to the data.length)\n\nExample: \n```javascript\nimport * as agen from '@agen/encoding';\n\nconst blockSize = 64;\nconst f = agen.encode(blockSize);\n\nconst textChunks = [\n  `съешь же\\n ещё`,\n  ` этих\\n мягких французских \\nбулок, `,\n  `да выпей\\nчаю`\n]\nfor await (let chunk of f(textChunks)) {\n  console.log('*', chunk);\n}\n// Output:\n// * Uint8Array(63)[\n//   209, 129, 209, 138, 208, 181, 209, 136, 209, 140,\n//   32, 208, 182, 208, 181, 10, 32, 208, 181, 209,\n//   137, 209, 145, 32, 209, 141, 209, 130, 208, 184,\n//   209, 133, 10, 32, 208, 188, 209, 143, 208, 179,\n//   208, 186, 208, 184, 209, 133, 32, 209, 132, 209,\n//   128, 208, 176, 208, 189, 209, 134, 209, 131, 208,\n//   183, 209, 129\n// ]\n// * Uint8Array(42)[\n//   208, 186, 208, 184, 209, 133, 32, 10,\n//   208, 177, 209, 131, 208, 187, 208, 190,\n//   208, 186, 44, 32, 208, 180, 208, 176,\n//   32, 208, 178, 209, 139, 208, 191, 208,\n//   181, 208, 185, 10, 209, 135, 208, 176,\n//   209, 142\n// ]\n```\n\n`decode` method\n---------------\n\nDecodes binary blocks and returns decoded strings.\n\nParamters:\n- `onBlock` - an optional method recieving full information \n  about the decoded string chunk; this method is called \n  just before the decoded string is returned by the iterator.\n  Structure of the information object:\n  - `data` - the string chunk\n  - `byteIdx` - position of the returned string in the original byte stream\n  - `byteLen` - byte lengths of the string\n  - `charIdx` - position of the first character of the returned string\n  - `charLen` - length of the string chunk (the same as str.length)\n  - `firstLine` - line of the first character of the returned string\n  - `firstPos` - position on the line for the first character\n  - `lastLine` - the line of the last character of the returned string\n  - `lastPos` - line position of the last returned character\n\nExample: \n```javascript\nimport * as agen from '@agen/encoding';\n\nconst f = agen.decode();\nconst blocks = [\n  Uint8Array.from([\n    209, 129, 209, 138, 208, 181, 209, 136, 209, 140,\n    32, 208, 182, 208, 181, 10, 32, 208, 181, 209,\n    137, 209, 145, 32, 209, 141, 209, 130, 208, 184,\n    209, 133, 10, 32, 208, 188, 209, 143, 208, 179,\n    208, 186, 208, 184, 209, 133, 32, 209, 132, 209,\n    128, 208, 176, 208, 189, 209, 134, 209, 131, 208,\n    183, 209, 129\n  ]),\n  Uint8Array.from([\n    208, 186, 208, 184, 209, 133, 32, 10,\n    208, 177, 209, 131, 208, 187, 208, 190,\n    208, 186, 44, 32, 208, 180, 208, 176,\n    32, 208, 178, 209, 139, 208, 191, 208,\n    181, 208, 185, 10, 209, 135, 208, 176,\n    209, 142\n  ])\n];\nfor await (let str of f(blocks)) {\n  console.log('*', str);\n}\n// Output:\n// * съешь же\n// ещё этих\n// мягких французс\n//   * ких\n// булок, да выпей\n// чаю\n\n```\n\n`lines` method\n--------------\n\nDecodes binary stream and returns individual lines.\nThe returned lines contain the trailing `\"\\n\"` symbol (except, eventually, the last line).\n\nParamters:\n- `onBlock` - an optional method recieving full information \n  about the decoded string chunk; this method is called \n  just before the decoded string is returned by the iterator.\n  Structure of the information object:\n  - `data` - the string chunk\n  - `byteIdx` - position of the returned string in the original byte stream\n  - `byteLen` - byte lengths of the string\n  - `charIdx` - position of the first character of the returned string\n  - `charLen` - length of the string chunk (the same as str.length)\n  - `firstLine` - line of the first character of the returned string\n  - `firstPos` - position on the line for the first character\n  - `lastLine` - the line of the last character of the returned string\n  - `lastPos` - line position of the last returned character\n\nExample: \n```javascript\nimport * as agen from '@agen/encoding';\n\nconst f = agen.lines();\nconst blocks = [\n  Uint8Array.from([\n    209, 129, 209, 138, 208, 181, 209, 136, 209, 140,\n    32, 208, 182, 208, 181, 10, 32, 208, 181, 209,\n    137, 209, 145, 32, 209, 141, 209, 130, 208, 184,\n    209, 133, 10, 32, 208, 188, 209, 143, 208, 179,\n    208, 186, 208, 184, 209, 133, 32, 209, 132, 209,\n    128, 208, 176, 208, 189, 209, 134, 209, 131, 208,\n    183, 209, 129\n  ]),\n  Uint8Array.from([\n    208, 186, 208, 184, 209, 133, 32, 10,\n    208, 177, 209, 131, 208, 187, 208, 190,\n    208, 186, 44, 32, 208, 180, 208, 176,\n    32, 208, 178, 209, 139, 208, 191, 208,\n    181, 208, 185, 10, 209, 135, 208, 176,\n    209, 142\n  ])\n];\nfor await (let line of f(blocks)) {\n  console.log('*', line);\n}\n// Output:\n// * съешь же\n//\n// *  ещё этих\n//\n// *  мягких французских \n//\n// * булок, да выпей\n//\n// * чаю\n\n```\n\n`encodeBlocks` method\n---------------------\n\nThis method recieves strings and transforms them to byte chunks with\nassociated position information.\n\nParameters:\n- `blockSize` (default: `1024`) - size of generated chunks\n- `ArrayType` (default: `Uint8Array`) - type of the generated byte arrays\n\nReturned values have the following structure:\n- `data` - a byte sequence encoding a string chunk\n- `charIdx` - position of the first encoded character in the initial stream\n- `charLen` - length of the encoded block of characters\n- `byteIdx` - byte position of the encoded block in the resulting binary stream\n- `byteLen` - length of the encoded data block (equals to the data.length)\n\nExample: \n```javascript\nimport * as agen from '@agen/encoding';\n\nconst blockSize = 64;\nconst f = agen.encodeBlocks(blockSize);\n\nconst textChunks = [\n  `съешь же\\n ещё`,\n  ` этих\\n мягких французских \\nбулок, `,\n  `да выпей\\nчаю`\n]\n\nfor await (let info of f(textChunks)) {\n  console.log(`-----------`)\n  console.log('*', info);\n}\n// Output:\n// -----------\n// * {\n//   byteIdx: 0,\n//   charIdx: 0,\n//   byteLen: 63,\n//   charLen: 35,\n//   data: Uint8Array(63)[\n//     209, 129, 209, 138, 208, 181, 209, 136, 209, 140,\n//     32, 208, 182, 208, 181, 10, 32, 208, 181, 209,\n//     137, 209, 145, 32, 209, 141, 209, 130, 208, 184,\n//     209, 133, 10, 32, 208, 188, 209, 143, 208, 179,\n//     208, 186, 208, 184, 209, 133, 32, 209, 132, 209,\n//     128, 208, 176, 208, 189, 209, 134, 209, 131, 208,\n//     183, 209, 129\n//   ]\n// }\n// -----------\n// * {\n//   byteIdx: 63,\n//   charIdx: 35,\n//   byteLen: 42,\n//   charLen: 24,\n//   data: Uint8Array(42)[\n//     208, 186, 208, 184, 209, 133, 32, 10,\n//     208, 177, 209, 131, 208, 187, 208, 190,\n//     208, 186, 44, 32, 208, 180, 208, 176,\n//     32, 208, 178, 209, 139, 208, 191, 208,\n//     181, 208, 185, 10, 209, 135, 208, 176,\n//     209, 142\n//   ]\n// }\n\n```\n\n`decodeBlocks` method\n---------------------\n\nDecodes provided stream of UTF-8 texts. Returns information about indididual blocks \nin the stream - their byte position, character position, byte and char lengths, also\nthe line numbers and line positions of the beginning and block ends.\n\nParameters:\n- `splitter` - optional splitter; with this parameter this method\n  additionally splits blocks; it can be useful to split the strim to new lines\n  (by the '\\n' symbol). Note that to re-create full lines the returned blocks should be \n  analized and concatenated together if they are started on the same line. \n\nThe returned messages have the following structure:\n- `data` - the string chunk\n- `byteIdx` - position of the returned string in the original byte stream\n- `byteLen` - byte lengths of the string\n- `charIdx` - position of the first character of the returned string\n- `charLen` - length of the string chunk (the same as str.length)\n- `firstLine` - line of the first character of the returned string\n- `firstPos` - position on the line for the first character\n- `lastLine` - the line of the last character of the returned string\n- `lastPos` - line position of the last returned character\n\nExample: \n```javascript\n\nimport * as agen from '@agen/encoding';\n\nconst f = agen.decodeBlocks();\n\nconst blocks = [\n  Uint8Array.from([\n    209, 129, 209, 138, 208, 181, 209, 136, 209, 140,\n    32, 208, 182, 208, 181, 10, 32, 208, 181, 209,\n    137, 209, 145, 32, 209, 141, 209, 130, 208, 184,\n    209, 133, 10, 32, 208, 188, 209, 143, 208, 179,\n    208, 186, 208, 184, 209, 133, 32, 209, 132, 209,\n    128, 208, 176, 208, 189, 209, 134, 209, 131, 208,\n    183, 209, 129\n  ]),\n  Uint8Array.from([\n    208, 186, 208, 184, 209, 133, 32, 10,\n    208, 177, 209, 131, 208, 187, 208, 190,\n    208, 186, 44, 32, 208, 180, 208, 176,\n    32, 208, 178, 209, 139, 208, 191, 208,\n    181, 208, 185, 10, 209, 135, 208, 176,\n    209, 142\n  ])\n];\n\nfor await (let info of f(blocks)) {\n  console.log(`-----------`)\n  console.log('*', info);\n}\n// Output:\n// -----------\n// * {\n//   charIdx: 0,\n//   charLen: 35,\n//   byteIdx: 0,\n//   byteLen: 63,\n//   firstLine: 0,\n//   firstPos: 0,\n//   lastLine: 2,\n//   lastPos: 16,\n//   data: 'съешь же\\n ещё этих\\n мягких французс'\n// }\n// -----------\n// * {\n//   charIdx: 35,\n//   charLen: 24,\n//   byteIdx: 63,\n//   byteLen: 42,\n//   firstLine: 2,\n//   firstPos: 16,\n//   lastLine: 4,\n//   lastPos: 3,\n//   data: 'ких \\nбулок, да выпей\\nчаю'\n// }\n```\n\n`decodeLines` method\n--------------------\n\nDecodes and returns individual lines from the byte stream. The returned lines\nare associated with their position information.\nAll lines contain the trailing `\"\\n\"` symbol except, eventually, the last one.\n\nThe returned messages have the following structure:\n- `data` - the line string; it contains the `\\\\n` symbol at the end.\n- `byteIdx` - byte position of the returned line in the original byte stream\n- `byteLen` - byte lengths of the line\n- `charIdx` - position of the first character of the line\n- `charLen` - length of the line (the same as data.length)\n- `firstLine` - line of the first character of the returned string\n- `firstPos` - position on the line for the first character (it is always 0)\n- `lastLine` - the line of the last character of the returned string\n- `lastPos` - line position of the last returned character; \n   it is 0 most of the time and can be different for the last line\nExample: \n```javascript\nimport * as agen from '@agen/encoding';\n\nconst f = agen.decodeLines();\n\nconst blocks = [\n  Uint8Array.from([\n    209, 129, 209, 138, 208, 181, 209, 136, 209, 140,\n    32, 208, 182, 208, 181, 10, 32, 208, 181, 209,\n    137, 209, 145, 32, 209, 141, 209, 130, 208, 184,\n    209, 133, 10, 32, 208, 188, 209, 143, 208, 179,\n    208, 186, 208, 184, 209, 133, 32, 209, 132, 209,\n    128, 208, 176, 208, 189, 209, 134, 209, 131, 208,\n    183, 209, 129\n  ]),\n  Uint8Array.from([\n    208, 186, 208, 184, 209, 133, 32, 10,\n    208, 177, 209, 131, 208, 187, 208, 190,\n    208, 186, 44, 32, 208, 180, 208, 176,\n    32, 208, 178, 209, 139, 208, 191, 208,\n    181, 208, 185, 10, 209, 135, 208, 176,\n    209, 142\n  ])\n];\n\nfor await (let info of f(blocks)) {\n  console.log(`-----------`)\n  console.log('*', info);\n}\n// Output:\n// -----------\n// * {\n//   charIdx: 0,\n//   charLen: 9,\n//   byteIdx: 0,\n//   byteLen: 16,\n//   firstLine: 0,\n//   firstPos: 0,\n//   lastLine: 1,\n//   lastPos: 0,\n//   data: \"съешь же\\n\"\n// }\n// -----------\n// * {\n//   charIdx: 9,\n//   charLen: 10,\n//   byteIdx: 16,\n//   byteLen: 17,\n//   firstLine: 1,\n//   firstPos: 0,\n//   lastLine: 2,\n//   lastPos: 0,\n//   data: \" ещё этих\\n\"\n// }\n// -----------\n// * {\n//   charIdx: 19,\n//   charLen: 21,\n//   byteIdx: 33,\n//   byteLen: 38,\n//   firstLine: 2,\n//   firstPos: 0,\n//   lastLine: 3,\n//   lastPos: 0,\n//   data: \" мягких французских \\n\"\n// }\n// -----------\n// * {\n//   charIdx: 40,\n//   charLen: 16,\n//   byteIdx: 71,\n//   byteLen: 28,\n//   firstLine: 3,\n//   firstPos: 0,\n//   lastLine: 4,\n//   lastPos: 0,\n//   data: \"булок, да выпей\\n\"\n// }\n// -----------\n// * {\n//   charIdx: 56,\n//   charLen: 3,\n//   byteIdx: 99,\n//   byteLen: 6,\n//   firstLine: 4,\n//   firstPos: 0,\n//   lastLine: 4,\n//   lastPos: 3,\n//   data: \"чаю\"\n// }\n```\n\n`newEncoder` method\n-------------------\n\nThis method accepts one character code, updates the given buffer and returns \nthe number of written bytes.\n\nReturned method accepts the following parameters:\n- `code` - code of the character to encode\n- `buf` - buffer where character bytes should be written\n- `idx` - start position in the buffer where encoded bytes should be written\n\nThis method returns the number of encoded bytes.\n\nExample: \n```javascript\nimport * as agen from '@agen/encoding';\n\nconst enc = agen.newEncoder();\nconst charCode = 'ё'.charCodeAt(0);\nconst buf = [0, 0, 0, 0];\nconst len = enc(charCode, buf, 0);\nconsole.log('Number of written bytes:', len);\nconsole.log('Buffer content:', buf);\n// Output:\n// Number of written bytes: 2\n// Buffer content: [209, 145, 0, 0]\n```\n\n`newDecoder` method\n-------------------\n\nThis method accepts one byte and returns a string with the decoded characters.\n\nReturned method accepts the following parameters:\n- `byte` - one byte from the stream\n\nThis method returns a string with the decoded characters. If there is no \ncharacters ready to output then it returns an empty string.\n\nExample: \n```javascript\nimport * as agen from '@agen/encoding';\n\nconst dec = agen.newDecoder();\nconst buf = [ 209, 145 ];\nfor (let i = 0; i < buf.length; i++) {\n  const byte = buf[i];\n  let s = dec(byte);\n  console.log(`${i}) ${byte} - \"${s}\"`);\n}\n// Output:\n// 0) 209 - \"\"\n// 1) 145 - \"ё\"\n```\n\n","readmeFilename":"README.md"}