{"_id":"bzip2","_rev":"8-80d4cf0bbb4cf70ab1c4d3b5e5fe5ee6","name":"bzip2","description":"A npm package of a bunzip implementation in pure javascript","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"bzip2","version":"0.1.0","description":"A npm package of a bunzip implementation in pure javascript","author":{"name":"Jordan Rousseau","email":"jv.rousseau@outlook.com"},"homepage":"https://github.com/jvrousseau/bzip2.js","repository":{"url":"git@github.com:jvrousseau/bzip2.js.git","type":"git"},"main":"bzip2","bugs":{"url":"https://github.com/jvrousseau/bzip2.js/issues"},"_id":"bzip2@0.1.0","dist":{"shasum":"f4bec09fa7a6e51e80c9d8e623e8f45140cb52ab","tarball":"https://registry.npmjs.org/bzip2/-/bzip2-0.1.0.tgz","integrity":"sha512-3/nsg1OEsZyBMkPsyAoWG9imKTh2GwR787Wk2vyRoIkbsxMkaeIULJLkuqi+r22fGqY8DeCZiproT1qyXx6zQw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC8miUFU4K2XEj5pxuCVp010CGzr/2FG1nkpXP8NITLSAiEAhSkkifTv4VhUTO2CgO9OGoUUb6ZdEc1eFwGz6Cwo0zg="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"jvrousseau","email":"jv.rousseau@outlook.com"},"maintainers":[{"name":"jvrousseau","email":"jv.rousseau@outlook.com"}]},"0.1.1":{"name":"bzip2","version":"0.1.1","description":"A npm package of a bunzip implementation in pure javascript","author":{"name":"Jordan Rousseau","email":"jv.rousseau@outlook.com"},"homepage":"https://github.com/jvrousseau/bzip2.js","repository":{"url":"git@github.com:jvrousseau/bzip2.js.git","type":"git"},"main":"bzip2","gitHead":"decfb7b8c8bc369ec2acf2e5d0eb884df3be0a1e","bugs":{"url":"https://github.com/jvrousseau/bzip2.js/issues"},"_id":"bzip2@0.1.1","scripts":{},"_shasum":"b0d232bd0f0f750d2023306d40a886ee51b901f4","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"jvrousseau","email":"jv.rousseau@outlook.com"},"maintainers":[{"name":"jvrousseau","email":"jv.rousseau@outlook.com"}],"dist":{"shasum":"b0d232bd0f0f750d2023306d40a886ee51b901f4","tarball":"https://registry.npmjs.org/bzip2/-/bzip2-0.1.1.tgz","integrity":"sha512-wMvOIQ5jX3ikcCxWO1HjYVOAB+sjKzMTYLQmFPi4d6GBF01cYpnIwQ4RaDX4F3QSJeiB6gFqt5hh9fbebCSspw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAbitjF/c8DAkn1ZXxIdelSruQTmidMiiS5eXEcc696dAiEApGI6jJNsmszd2dQLw6Iz/8tH3aI0AcTwdjVrlbgzrcc="}]}}},"readme":"So, I guess this would be the readme file for my bzip2 implementation.\n\nIt's actually pretty simple to use, you can pass your `Uint8Array` to the `bzip2.array` method to get a bit reader function. This bit reader function is what all the other methods, `header`, `decompress`, and `simple` use. \n\n`header(bitstream)` quite obviously reads in the bzip2 file header. It returns a single number between 1 and 9 describing the block size, which is one of the arguments of `decompress`\n\n`decompress(bitstream, size[, len])` does the main decompression of a single block. It'll return -1 if it detects that it's the final block, otherwise it returns a string with the decompressed data. If you want to cap the output to a certain number of bytes, set the `len` argument.\n\n`simple(bitstream)` is what you probably want to use, because it combines `header` and loops over `decompress` so that the entire file is decompressed and returned as a string.\n\n`array(typed_array)` is the function that generates that mythical bitstream function from a standard `Uint8Array` which you can make from an array buffer with `new Uint8Array(arraybuffer)`.\n","maintainers":[{"name":"jvrousseau","email":"jv.rousseau@outlook.com"}],"time":{"modified":"2022-06-13T05:22:01.681Z","created":"2014-02-13T05:53:25.920Z","0.1.0":"2014-02-13T05:53:27.369Z","0.1.1":"2014-12-03T16:43:11.852Z"},"readmeFilename":"README.md","author":{"name":"Jordan Rousseau","email":"jv.rousseau@outlook.com"},"repository":{"url":"git@github.com:jvrousseau/bzip2.js.git","type":"git"},"homepage":"https://github.com/jvrousseau/bzip2.js","bugs":{"url":"https://github.com/jvrousseau/bzip2.js/issues"}}