{"_id":"base64-stream","_rev":"3803926","name":"base64-stream","description":"Contains new Node.js v0.10 style stream classes for encoding / decoding Base64 data","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"rossj","email":""}],"time":{"modified":"2025-06-05T10:55:03.000Z","created":"2013-07-09T02:10:58.040Z","1.0.0":"2018-10-14T14:29:53.843Z","0.1.5":"2018-10-14T14:25:31.941Z","0.1.4":"2018-10-12T17:19:38.930Z","0.1.3":"2015-10-09T17:43:05.521Z","0.1.2":"2013-07-11T21:16:10.569Z","0.1.1":"2013-07-09T07:10:41.865Z","0.1.0":"2013-07-09T04:23:23.088Z","0.0.1":"2013-07-09T02:10:58.040Z"},"users":{},"author":{"name":"Ross Johnson","email":"ross@mazira.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/mazira/base64-stream.git"},"versions":{"1.0.0":{"name":"base64-stream","description":"Contains new Node.js v0.10 style stream classes for encoding / decoding Base64 data","keywords":["Base64","stream","streaming","piping","node","node.js","encode","decode"],"author":{"name":"Ross Johnson","email":"ross@mazira.com"},"version":"1.0.0","repository":{"type":"git","url":"git+ssh://git@github.com/mazira/base64-stream.git"},"scripts":{"test":"mocha --reporter spec"},"dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"license":"MIT","engine":"node >= 0.8.0","gitHead":"994b84d7a022faaad590c8e79966bfada3efff24","bugs":{"url":"https://github.com/mazira/base64-stream/issues"},"homepage":"https://github.com/mazira/base64-stream#readme","_id":"base64-stream@1.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"rossj","email":"ross@mazira.com"},"dist":{"shasum":"157ae00bc7888695e884e1fcc51c551fdfa8a1fa","size":2845,"noattachment":false,"key":"/base64-stream/-/base64-stream-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/base64-stream/download/base64-stream-1.0.0.tgz"},"maintainers":[{"name":"rossj","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/base64-stream_1.0.0_1539527393753_0.48322501618036373"},"_hasShrinkwrap":false,"publish_time":1539527393843,"_cnpm_publish_time":1539527393843,"_cnpmcore_publish_time":"2021-12-16T22:15:34.189Z"},"0.1.5":{"name":"base64-stream","description":"Contains new Node.js v0.10 style stream classes for encoding / decoding Base64 data","keywords":["Base64","stream","streaming","piping","node","node.js","encode","decode"],"author":{"name":"Ross Johnson","email":"ross@mazira.com"},"version":"0.1.5","repository":{"type":"git","url":"git+ssh://git@github.com/mazira/base64-stream.git"},"scripts":{"test":"mocha --reporter spec"},"dependencies":{"readable-stream":"^2.0.2"},"devDependencies":{"mocha":"*","should":"*"},"license":"MIT","engine":"node >= 0.8.0","gitHead":"1e6cf9989e9b2dc653d99eb42e027db988f6a82b","bugs":{"url":"https://github.com/mazira/base64-stream/issues"},"homepage":"https://github.com/mazira/base64-stream#readme","_id":"base64-stream@0.1.5","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"rossj","email":"ross@mazira.com"},"dist":{"shasum":"f712ae6456ee8dfaf8b444da91d96d88cc394c2f","size":2515,"noattachment":false,"key":"/base64-stream/-/base64-stream-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/base64-stream/download/base64-stream-0.1.5.tgz"},"maintainers":[{"name":"rossj","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/base64-stream_0.1.5_1539527131855_0.11751280330912306"},"_hasShrinkwrap":false,"publish_time":1539527131941,"_cnpm_publish_time":1539527131941,"_cnpmcore_publish_time":"2021-12-16T22:15:34.625Z"},"0.1.4":{"name":"base64-stream","description":"Contains new Node.js v0.10 style stream classes for encoding / decoding Base64 data","keywords":["Base64","stream","streaming","piping","node","node.js","encode","decode"],"author":{"name":"Ross Johnson","email":"ross@mazira.com"},"version":"0.1.4","repository":{"type":"git","url":"git+ssh://git@github.com/mazira/base64-stream.git"},"scripts":{"test":"mocha --reporter spec"},"dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"license":"MIT","engine":"node >= 0.8.0","gitHead":"54073e0ab3b5c211a9f9ecec1b91792153a7ffb2","bugs":{"url":"https://github.com/mazira/base64-stream/issues"},"homepage":"https://github.com/mazira/base64-stream#readme","_id":"base64-stream@0.1.4","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"rossj","email":"ross@mazira.com"},"dist":{"shasum":"4a6324474b56af964234399249b20815ab322963","size":2866,"noattachment":false,"key":"/base64-stream/-/base64-stream-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/base64-stream/download/base64-stream-0.1.4.tgz"},"maintainers":[{"name":"rossj","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/base64-stream_0.1.4_1539364778823_0.22021352220385726"},"_hasShrinkwrap":false,"publish_time":1539364778930,"_cnpm_publish_time":1539364778930,"_cnpmcore_publish_time":"2021-12-16T22:15:34.819Z"},"0.1.3":{"name":"base64-stream","description":"Contains new Node.js v0.10 style stream classes for encoding / decoding Base64 data","keywords":["Base64","stream","streaming","piping","node","node.js","encode","decode"],"author":{"name":"Ross Johnson","email":"ross@mazira.com"},"version":"0.1.3","repository":{"type":"git","url":"git+ssh://git@github.com/mazira/base64-stream.git"},"scripts":{"test":"mocha --reporter spec"},"dependencies":{"readable-stream":"^2.0.2"},"devDependencies":{"mocha":"*","should":"*"},"license":"MIT","engine":"node >= 0.8.0","gitHead":"1e6cf9989e9b2dc653d99eb42e027db988f6a82b","bugs":{"url":"https://github.com/mazira/base64-stream/issues"},"homepage":"https://github.com/mazira/base64-stream#readme","_id":"base64-stream@0.1.3","_shasum":"76b0370b779bb816d12fd41764a6b8573eb5fec3","_from":".","_npmVersion":"2.14.6","_nodeVersion":"4.1.2","_npmUser":{"name":"rossj","email":"ross@mazira.com"},"dist":{"shasum":"76b0370b779bb816d12fd41764a6b8573eb5fec3","size":7146680,"noattachment":false,"key":"/base64-stream/-/base64-stream-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/base64-stream/download/base64-stream-0.1.3.tgz"},"maintainers":[{"name":"rossj","email":""}],"directories":{},"publish_time":1444412585521,"_hasShrinkwrap":false,"_cnpm_publish_time":1444412585521,"_cnpmcore_publish_time":"2021-12-16T22:15:46.403Z"},"0.1.2":{"name":"base64-stream","description":"Contains new Node.js v0.10 style stream classes for encoding / decoding Base64 data","keywords":["Base64","stream","streaming","piping","node","node.js","encode","decode"],"author":{"name":"Ross Johnson","email":"ross@mazira.com"},"version":"0.1.2","repository":{"type":"git","url":"http://github.com/mazira/base64-stream"},"scripts":{"test":"mocha --reporter spec"},"dependencies":{"readable-stream":"1.0.2"},"devDependencies":{"mocha":"*","should":"*"},"license":"MIT","engine":"node >= 0.8.0","readmeFilename":"README.md","bugs":{"url":"https://github.com/mazira/base64-stream/issues"},"_id":"base64-stream@0.1.2","dist":{"shasum":"a1a79a6186d3507a7f626090120a57c7b82884d0","size":3052,"noattachment":false,"key":"/base64-stream/-/base64-stream-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/base64-stream/download/base64-stream-0.1.2.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"rossj","email":"ross@mazira.com"},"maintainers":[{"name":"rossj","email":""}],"directories":{},"publish_time":1373577370569,"_hasShrinkwrap":false,"_cnpm_publish_time":1373577370569,"_cnpmcore_publish_time":"2021-12-16T22:15:46.784Z"},"0.1.1":{"name":"base64-stream","description":"Contains new Node.js v0.10 style stream classes for encoding / decoding Base64 data","keywords":["Base64","stream","streaming","piping","node","node.js","encode","decode"],"author":{"name":"Ross Johnson","email":"ross@mazira.com"},"version":"0.1.1","repository":{"type":"git","url":"http://github.com/mazira/base64-stream"},"scripts":{"test":"mocha --reporter spec"},"dependencies":{"readable-stream":"1.0.2"},"devDependencies":{"mocha":"*","should":"*"},"license":"MIT","engine":"node >= 0.8.0","readmeFilename":"README.md","bugs":{"url":"https://github.com/mazira/base64-stream/issues"},"_id":"base64-stream@0.1.1","dist":{"shasum":"775150aba691c24308ace39fa32e1ae25caaf10e","size":2908,"noattachment":false,"key":"/base64-stream/-/base64-stream-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/base64-stream/download/base64-stream-0.1.1.tgz"},"_from":".","_npmVersion":"1.2.25","_npmUser":{"name":"rossj","email":"ross@mazira.com"},"maintainers":[{"name":"rossj","email":""}],"directories":{},"publish_time":1373353841865,"_hasShrinkwrap":false,"_cnpm_publish_time":1373353841865,"_cnpmcore_publish_time":"2021-12-16T22:15:46.987Z"},"0.1.0":{"name":"base64-stream","description":"Contains new Node.js v0.10 style stream classes for encoding / decoding Base64 data","keywords":["Base64","stream","streaming","piping","node","node.js","encode","decode"],"author":{"name":"Ross Johnson","email":"ross@mazira.com"},"version":"0.1.0","repository":{"type":"git","url":"http://github.com/mazira/base64-stream"},"scripts":{"test":"mocha --reporter spec"},"dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"license":"MIT","engine":"node >= 10.0","readmeFilename":"README.md","bugs":{"url":"https://github.com/mazira/base64-stream/issues"},"_id":"base64-stream@0.1.0","dist":{"shasum":"693db93b36a87b44ba0f113c13a03b369fba3d7e","size":2886,"noattachment":false,"key":"/base64-stream/-/base64-stream-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/base64-stream/download/base64-stream-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"rossj","email":"ross@mazira.com"},"maintainers":[{"name":"rossj","email":""}],"directories":{},"publish_time":1373343803088,"_hasShrinkwrap":false,"_cnpm_publish_time":1373343803088,"_cnpmcore_publish_time":"2021-12-16T22:15:47.201Z"},"0.0.1":{"name":"base64-stream","description":"Contains new Node v0.10 style stream classes for encoding / decoding Base64 data","keywords":["Base64","stream","streaming","piping"],"author":{"name":"Ross Johnson","email":"ross@mazira.com"},"version":"0.0.1","repository":{"type":"git","url":"http://github.com/mazira/base64-stream"},"scripts":{"test":"mocha --reporter spec"},"dependencies":{},"devDependencies":{"mocha":"*","should":"*"},"license":"MIT","engine":"node >= 10.0","readmeFilename":"README.md","bugs":{"url":"https://github.com/mazira/base64-stream/issues"},"_id":"base64-stream@0.0.1","dist":{"shasum":"9289593a8bd5b11a7eb6f1fb7b086150aa80ad5d","size":2389,"noattachment":false,"key":"/base64-stream/-/base64-stream-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/base64-stream/download/base64-stream-0.0.1.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"rossj","email":"ross@mazira.com"},"maintainers":[{"name":"rossj","email":""}],"directories":{},"publish_time":1373335858040,"_hasShrinkwrap":false,"_cnpm_publish_time":1373335858040,"_cnpmcore_publish_time":"2021-12-16T22:15:47.427Z"}},"readme":"# Introduction\n\nWhile Node.js has built-in support for Base64 data, it does not come with the ability to encode / decode data in a stream.\n\nThis library contains a streaming Base64 encoder and a streaming Base64 decoder for use with Node.js. These classes are written using the Node.js [stream interfaces](http://nodejs.org/api/stream.html) and are well covered with unit tests.\n\n# Usage\n\n## Installation\n\nTo install base64-stream\n\n    npm install base64-stream\n    \n## Examples\nThis example encodes an image and pipes it to stdout.\n\n```javascript\nvar http = require('http');\nvar {Base64Encode} = require('base64-stream');\n\nvar img = 'http://farm3.staticflickr.com/2433/3973241798_86ddfa642b_o.jpg';\nhttp.get(img, function(res) {\n    if (res.statusCode === 200)\n        res.pipe(new Base64Encode()).pipe(process.stdout);\n});\n```\n\nThis example takes in Base64 encoded data on stdin, decodes it, an pipes it to stdout.\n```javascript\nvar {Base64Encode} = require('base64-stream');\nprocess.stdin.pipe(new Base64Encode()).pipe(process.stdout);\n```\n\n## options:\n\n`Base64Encode` can take an optional object `{lineLength: number, prefix: string}`  \nThe prefix is useful for prepending for example `data:image/png;base64,` to make a base64 URL.  \nThis example proxies an image url, and send the base64 string in response.\n\n```\napp.get('/i/*', function(req, res){ // using express for example\n\tfetch(req.params[0]) // using node-fetch\n\t.then(r=>r.body.pipe(new Base64Encode({prefix:`data:${r.headers.get('content-type')};base64,`})).pipe(res))\n\t.catch(console.error);\n});\n```\n\n# Requirements\n\nThis module currently requires Node 6.0.0 or higher.\n\n# Testing\n\nTo run the unit tests\n\n    npm test\n\n# License\nMIT\n","_attachments":{},"homepage":"https://github.com/mazira/base64-stream#readme","bugs":{"url":"https://github.com/mazira/base64-stream/issues"},"license":"MIT"}