{"_id":"buffer-signature","_rev":"6-5811066a8b393d413ce065dcf79eca63","name":"buffer-signature","description":"Get the mimetype of a buffer based on its contents","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"buffer-signature","version":"1.0.0","description":"Get the mimetype of a buffer based on its contents","main":"buffer-signature.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git+https://github.com/iarna/buffer-signature.git"},"keywords":["mime","file","signature","magic numbers","file type","type","mimetype"],"author":{"name":"Rebecca Turner","email":"me@re-becca.org"},"contributors":[{"name":"Michael Leaney","email":"leahcimic@gmail.com"}],"license":"ISC","devDependencies":{"jasmine":"^2.3.2","tap":"^8.0.1"},"dependencies":{"readable-stream":"^2.2.2"},"files":["buffer-signature.js","signatures.js"],"gitHead":"aa263dd11316a23e5b57d2d8f39b9339e0a6678a","bugs":{"url":"https://github.com/iarna/buffer-signature/issues"},"homepage":"https://github.com/iarna/buffer-signature#readme","_id":"buffer-signature@1.0.0","_shasum":"a22af87606fa5791c75d3803bb1860e18d21337f","_from":".","_npmVersion":"4.1.1","_nodeVersion":"7.2.1","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"a22af87606fa5791c75d3803bb1860e18d21337f","tarball":"https://registry.npmjs.org/buffer-signature/-/buffer-signature-1.0.0.tgz","integrity":"sha512-bUEi+bePNUZx/IYx7sK0Rp276nkolGKJrJA75/jdcck4Egd3YB3PR8Puvw8bpsUV74JOYtRzwdsYTP4Ubo+YyQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHnIdnabyeArsbli6InC2L7Bql8GeOCrCOVZZ4iJM6IzAiEAkFBQeVQNtt7t7SMAAQmfMoSLK3AzvcP9CnBI6QVBEiw="}]},"maintainers":[{"name":"iarna","email":"me@re-becca.org"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/buffer-signature-1.0.0.tgz_1482209829168_0.971075834473595"},"directories":{}},"1.1.0":{"name":"buffer-signature","version":"1.1.0","description":"Get the mimetype of a buffer based on its contents","main":"buffer-signature.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git+https://github.com/iarna/buffer-signature.git"},"keywords":["mime","file","signature","magic numbers","file type","type","mimetype"],"author":{"name":"Rebecca Turner","email":"me@re-becca.org"},"contributors":[{"name":"Michael Leaney","email":"leahcimic@gmail.com"}],"license":"ISC","devDependencies":{"tap":"^8.0.1"},"dependencies":{"readable-stream":"^2.2.2"},"gitHead":"123e15deff07ef84aca303cdb092010682f3d2c0","bugs":{"url":"https://github.com/iarna/buffer-signature/issues"},"homepage":"https://github.com/iarna/buffer-signature#readme","_id":"buffer-signature@1.1.0","_nodeVersion":"12.1.0","_npmVersion":"6.9.0","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"integrity":"sha512-Fn30Zkuv/fz1Ym3PmWy6J8ZkCI9OFb7FB1wcs8T0OzXqjoApl3aN1XMjQSvFlmV+M6AEeNVVxFqAVelQoDNDrg==","shasum":"81a34faf78c72d97cd33f6ac2da30bd24c3dabc7","tarball":"https://registry.npmjs.org/buffer-signature/-/buffer-signature-1.1.0.tgz","fileCount":4,"unpackedSize":32662,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc52mrCRA9TVsSAnZWagAAulwP+weeEUAb2hzsdMNw9PHi\npUjiJvIto3ep6Woi70bxRMBLtWzfrvk2zBtyqsC1bpBsVLR5vBOiTla684dn\ncWAxqg21EhsC4RMnbRhD7G45DSFBm5IOxetV8PMhHHP69uySX5bSUEOQF2qs\n+hBGKgwBmi8XrwBS3A1gsi8UZxjOcg5Vi3PlaeXEoepPepMdFJga8MTKzJLU\nmgf4mWJdHzw9XI1rp+blXbc56ickGehS3VOcEt3LonJZXRwjQ6e9qWH/9U58\nvdla6DT9Wyh21betm5EqJ2mqmBWsZSA5cKbtyIlHdnOZUv+qrezXUvDsPHWt\n0By8A/iwHGd1jVbiGBOJemL75HxljgVNXLz/NEICe+Qp0X3YsDvqP0SWpDAs\nb7Imxkw0BbdHE/dje2AcvhP6KWRqe6aOJvR0nWUC8lqH2Eq9oAONaTLE73Dd\nM+kow/6+FPbED4W7tBwOdng1MPCIZRzecqMchliSzdwnudCjKtDVInruBulk\nmEZSEi+wNlH/JDFUbp2ClohtNhl1cXQFnsB0pEdLR3r/DK1i0JKdsUywhMgd\nY4KUBtGQTvIkh+xCp3clmL81s5GJfG4CL2vY+9B9LGFHo/H45jxqkY/NrVFl\nzrOm+OH+Rv2XdeUl2HRNjbo9u7G9jlB4SJ5SszaU0E+TKYopoU2KAsiTz54+\ntSEV\r\n=xV96\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQXFBFMY7co9XRYg5AEvEgJMSH0w6ivkHe8J7Si4PfsQIhAJ+WdwoRO9HN6ROoma1zp25SJu6Wt3q94k/Oh6fS2s8l"}]},"maintainers":[{"name":"iarna","email":"me@re-becca.org"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/buffer-signature_1.1.0_1558669738774_0.2953189963190186"},"_hasShrinkwrap":false}},"readme":"# buffer-signature\n\nGet the mimetype of a buffer based on its contents.\n\nData for this script was generated from:\nhttp://en.wikipedia.org/wiki/List_of_file_signatures\n\nAdditional support for mp4 and mov formats from [@cmd430](https://github.com/cmd430)\n\nThis is a fork of [file-signature](https://npmjs.com/package/file-signature)\nby [@leahcimic](https://www.npmjs.com/~leahcimic).\n\nTo match against any file format, you'll need a minimum of 22 bytes from the\nstart of the file.\n\n## Example use:\n```js\n\nvar identifyBuffer = require('buffer-signature').identify;\nconsole.log(identifyBuffer(fs.readFileSync('path/to/file.jpg')));\n\nvar identifyStream = require('buffer-signature').identifyStream;\nfs.createReadStream('path/to/file.jpg').pipe(identifyStream(info => {\n  console.log(info)\n}).pipe(…whatever else you want to do with the data…)\n\n// outputs:\n// {\n//   description: 'A commonly used method of lossy compression for digital photography (image).',\n//   mimeType: 'image/jpg'\n//   extensions: ['jpg', 'jpeg']\n// }\n```\n\n#### Changes form `file-signature`\n\n* Made `identify` take a buffer instead of a filename\n* Added `identifyStream`\n* Refreshed magic number list from Wikipedia and fixed signature matcher to support offsets\n* Added a bunch of missing mimetypes\n* Ditched bespoke buffer equality function for `Buffer.equals`\n","maintainers":[{"name":"iarna","email":"me@re-becca.org"}],"time":{"modified":"2022-06-13T05:15:26.954Z","created":"2016-12-20T04:57:11.014Z","1.0.0":"2016-12-20T04:57:11.014Z","1.1.0":"2019-05-24T03:48:58.909Z"},"homepage":"https://github.com/iarna/buffer-signature#readme","keywords":["mime","file","signature","magic numbers","file type","type","mimetype"],"repository":{"type":"git","url":"git+https://github.com/iarna/buffer-signature.git"},"contributors":[{"name":"Michael Leaney","email":"leahcimic@gmail.com"}],"author":{"name":"Rebecca Turner","email":"me@re-becca.org"},"bugs":{"url":"https://github.com/iarna/buffer-signature/issues"},"license":"ISC","readmeFilename":"README.md","users":{"iarna":true}}