{"versions":{"5.0.0":{"name":"@xhmikosr/archive-type","version":"5.0.0","description":"Detect the archive type of a Buffer/Uint8Array","license":"MIT","repository":{"type":"git","url":"git+https://github.com/XhmikosR/archive-type.git"},"publishConfig":{"access":"public"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":"^14.14.0 || >=16.0.0"},"scripts":{"ava":"ava","lint":"xo","xo":"xo","fix":"xo --fix","test":"npm run ava"},"main":"index.js","type":"module","exports":{".":"./index.js"},"keywords":["7zip","archive","buffer","bz2","bzip2","check","detect","gz","gzip","mime","rar","zip","file","type"],"dependencies":{"file-type":"^12.4.2"},"devDependencies":{"ava":"^5.3.0","xo":"^0.54.2"},"gitHead":"f5e20ac2ec9a9394c0a0a77ef92ebff724853324","bugs":{"url":"https://github.com/XhmikosR/archive-type/issues"},"homepage":"https://github.com/XhmikosR/archive-type#readme","_id":"@xhmikosr/archive-type@5.0.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-l86YsKFntDpWs9BngiGD23+PdpKJMdmWIlSUGDMINx0k5eSfbV2zzAJyiwnG0gt+FammSlrLlsIlliCabAXIsg==","shasum":"e1423158aad89ff424f7c78d42d941e879d30ad2","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@xhmikosr/archive-type/-/archive-type-5.0.0.tgz","fileCount":4,"unpackedSize":3368,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGXFyuiX3/X2STUlToMz7VxP+3B89VF8Q4tobhhDMtWQIhAKT45mShjCMzXp2VH/FOW45BzDuUuETyv4oopa8etpQd"}],"size":1878},"_npmUser":{"name":"anonymous","email":"xhmikosr@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"xhmikosr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/archive-type_5.0.0_1685626963805_0.10347724046286766"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-06-01T13:42:43.987Z","publish_time":1685626963987,"_source_registry_name":"default","contributors":[]},"6.0.0":{"name":"@xhmikosr/archive-type","version":"6.0.0","description":"Detect the archive type of a Buffer/Uint8Array","license":"MIT","repository":{"type":"git","url":"git+https://github.com/XhmikosR/archive-type.git"},"publishConfig":{"access":"public"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=16"},"scripts":{"ava":"ava","lint":"xo","xo":"xo","fix":"xo --fix","test":"npm run ava"},"main":"index.js","type":"module","exports":{".":"./index.js"},"keywords":["7zip","archive","buffer","bz2","bzip2","check","detect","gz","gzip","mime","rar","zip","file","type"],"dependencies":{"file-type":"^18.5.0"},"devDependencies":{"ava":"^5.3.0","xo":"^0.54.2"},"gitHead":"7babd1bd52bbcfd00649f69c4e3c843df5478f59","bugs":{"url":"https://github.com/XhmikosR/archive-type/issues"},"homepage":"https://github.com/XhmikosR/archive-type#readme","_id":"@xhmikosr/archive-type@6.0.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-dqBzNDfSdoFjj3OnhLfMggtdDXqZjV+GlL657CSjnRlTKlb8zag3wJjBeUMlRCUlXGRy0KB2eYoqjnIMC3e7NA==","shasum":"a77a4509bc221db0122496ee9e2b5cefbffe2280","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@xhmikosr/archive-type/-/archive-type-6.0.0.tgz","fileCount":4,"unpackedSize":3387,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF7Hy4rD6RTXPdMx/labkNcM0wbDZJrJfjv3QnsWE3liAiA0RNm09VTOMx6EJcmcrMK8/q7dyS++bqfccClJ+/O//A=="}],"size":1862},"_npmUser":{"name":"anonymous","email":"xhmikosr@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"xhmikosr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/archive-type_6.0.0_1685964961258_0.4403521933975909"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-06-05T11:36:01.435Z","publish_time":1685964961435,"_source_registry_name":"default","contributors":[]},"6.0.1":{"name":"@xhmikosr/archive-type","version":"6.0.1","description":"Detect the archive type of a Buffer/Uint8Array","license":"MIT","repository":{"type":"git","url":"git+https://github.com/XhmikosR/archive-type.git"},"publishConfig":{"access":"public"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":"^14.14.0 || >=16.0.0"},"scripts":{"ava":"ava","lint":"xo","xo":"xo","fix":"xo --fix","test":"npm run ava"},"main":"index.js","type":"module","exports":{".":"./index.js"},"keywords":["7zip","archive","buffer","bz2","bzip2","check","detect","gz","gzip","mime","rar","zip","file","type"],"dependencies":{"file-type":"^18.5.0"},"devDependencies":{"ava":"^4.3.3","xo":"^0.54.2"},"gitHead":"bb2f5d11757d6ce35165337b595114228ba0c17c","bugs":{"url":"https://github.com/XhmikosR/archive-type/issues"},"homepage":"https://github.com/XhmikosR/archive-type#readme","_id":"@xhmikosr/archive-type@6.0.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-PB3NeJL8xARZt52yDBupK0dNPn8uIVQDe15qNehUpoeeLWCZyAOam4vGXnoZGz2N9D1VXtjievJuCsXam2TmbQ==","shasum":"684e9e5369bfa93223d7aeb2c84fe0780d6d5e24","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@xhmikosr/archive-type/-/archive-type-6.0.1.tgz","fileCount":4,"unpackedSize":3403,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD62opZm0ZwObrfDMGuzkKzletdwTca7h70xIvjnlEBtgIgdjm9R5BIYu+nWAq+7IG7UNHR9UOKfNGidAScQKeTR00="}],"size":1872},"_npmUser":{"name":"anonymous","email":"xhmikosr@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"xhmikosr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/archive-type_6.0.1_1685973173285_0.667786072240065"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-06-05T13:52:53.430Z","publish_time":1685973173430,"_source_registry_name":"default","contributors":[]},"7.0.0":{"name":"@xhmikosr/archive-type","version":"7.0.0","description":"Detect the archive type of a Buffer/Uint8Array","license":"MIT","repository":{"type":"git","url":"git+https://github.com/XhmikosR/archive-type.git"},"publishConfig":{"access":"public"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":"^14.14.0 || >=16.0.0"},"scripts":{"ava":"ava","lint":"xo","xo":"xo","fix":"xo --fix","test":"npm run ava"},"main":"index.js","type":"module","exports":{".":"./index.js"},"keywords":["7zip","archive","buffer","bz2","bzip2","check","detect","gz","gzip","mime","rar","zip","zst","zstd","file","type"],"dependencies":{"file-type":"^19.0.0"},"devDependencies":{"ava":"^6.1.2","xo":"^0.58.0"},"xo":{"rules":{"unicorn/prevent-abbreviations":"off"}},"_id":"@xhmikosr/archive-type@7.0.0","gitHead":"e52b3dde31468d3dff6c9cf92063958dfe75c3ca","bugs":{"url":"https://github.com/XhmikosR/archive-type/issues"},"homepage":"https://github.com/XhmikosR/archive-type#readme","_nodeVersion":"20.12.0","_npmVersion":"10.5.0","dist":{"integrity":"sha512-sIm84ZneCOJuiy3PpWR5bxkx3HaNt1pqaN+vncUBZIlPZCq8ASZH+hBVdu5H8znR7qYC6sKwx+ie2Q7qztJTxA==","shasum":"74746a210b59d7d8a77aa69a422f0dae025b3798","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@xhmikosr/archive-type/-/archive-type-7.0.0.tgz","fileCount":4,"unpackedSize":3494,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICF59bihwS1XYc9s3fk9kwVM17wZvi4yaphd3tyejK3lAiEAzfRFXRkuZQ3981uLQUhXxrw7hyhZTc/Mmk39rO9pVmQ="}],"size":1931},"_npmUser":{"name":"anonymous","email":"xhmikosr@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"xhmikosr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/archive-type_7.0.0_1711951946509_0.9839499660642415"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-04-01T06:12:26.699Z","publish_time":1711951946699,"_source_registry_name":"default","contributors":[]},"7.1.0":{"name":"@xhmikosr/archive-type","version":"7.1.0","description":"Detect the archive type of a Buffer/Uint8Array","license":"MIT","repository":{"type":"git","url":"git+https://github.com/XhmikosR/archive-type.git"},"publishConfig":{"access":"public"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=18"},"scripts":{"ava":"ava","lint":"xo","xo":"xo","fix":"xo --fix","test":"npm run ava"},"main":"index.js","type":"module","exports":{".":"./index.js"},"keywords":["7zip","archive","buffer","bz2","bzip2","check","detect","gz","gzip","mime","rar","zip","zst","zstd","file","type"],"dependencies":{"file-type":"^20.5.0"},"devDependencies":{"ava":"~6.2.0","xo":"^0.60.0"},"xo":{"rules":{"unicorn/prevent-abbreviations":"off"}},"_id":"@xhmikosr/archive-type@7.1.0","gitHead":"99e39b2ba5a23d26f7f82663daa0573888e499d7","bugs":{"url":"https://github.com/XhmikosR/archive-type/issues"},"homepage":"https://github.com/XhmikosR/archive-type#readme","_nodeVersion":"22.17.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-xZEpnGplg1sNPyEgFh0zbHxqlw5dtYg6viplmWSxUj12+QjU9SKu3U/2G73a15pEjLaOqTefNSZ1fOPUOT4Xgg==","shasum":"2983bcc547e119cdd345e50abaaeb6b7097daa44","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@xhmikosr/archive-type/-/archive-type-7.1.0.tgz","fileCount":4,"unpackedSize":3536,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDQEnW4ABnYrZkIJN85OW6Ob4AimtMEplcyaf6yxXVIiAIhAOj1aM0rAHoL+GyEiS03/oF/fTv6opRzXuwEXv6HGFzl"}],"size":1942},"_npmUser":{"name":"anonymous","email":"xhmikosr@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"xhmikosr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/archive-type_7.1.0_1753191915278_0.855498636965405"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-07-22T13:45:15.488Z","publish_time":1753191915488,"_source_registry_name":"default","contributors":[]},"8.0.0":{"name":"@xhmikosr/archive-type","version":"8.0.0","description":"Detect the archive type of a Buffer/Uint8Array","license":"MIT","repository":{"type":"git","url":"git+https://github.com/XhmikosR/archive-type.git"},"publishConfig":{"access":"public"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=20"},"scripts":{"ava":"ava","lint":"xo","xo":"xo","fix":"xo --fix","test":"npm run ava"},"main":"index.js","type":"module","exports":{".":"./index.js"},"keywords":["7zip","archive","buffer","bz2","bzip2","check","detect","gz","gzip","mime","rar","zip","zst","zstd","file","type"],"dependencies":{"file-type":"^21.3.0"},"devDependencies":{"ava":"^6.4.1","xo":"^1.2.3"},"xo":{"rules":{"unicorn/prevent-abbreviations":"off"}},"gitHead":"5bca1711877bc12b505782e1f136bea160cabdc1","_id":"@xhmikosr/archive-type@8.0.0","bugs":{"url":"https://github.com/XhmikosR/archive-type/issues"},"homepage":"https://github.com/XhmikosR/archive-type#readme","_nodeVersion":"24.13.1","_npmVersion":"11.8.0","dist":{"integrity":"sha512-U6zgcbvzKFToOtlEDzodMY4uiJbhAV9QB6SXJtUbarmIWXlvO90svKPK+WbzB9pZMR7FFo3jGZoXYTRmhrzlwg==","shasum":"3ea75f49b36449658ebb8a9c917b7d3acd8357ef","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@xhmikosr/archive-type/-/archive-type-8.0.0.tgz","fileCount":4,"unpackedSize":3739,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIF2g5n+stXmRXRUkeGkA3TaOhOlpLIBIp16blViTIMiyAiEA5rQer6DftHopfr8dpeLAPY0TXSasmuupvf/FI9FrATo="}],"size":2041},"_npmUser":{"name":"anonymous","email":"xhmikosr@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"xhmikosr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/archive-type_8.0.0_1771953745595_0.07621770647600656"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-24T17:22:25.724Z","publish_time":1771953745724,"_source_registry_name":"default","contributors":[]},"8.0.1":{"name":"@xhmikosr/archive-type","version":"8.0.1","description":"Detect the archive type of a Buffer/Uint8Array","license":"MIT","repository":{"type":"git","url":"git+https://github.com/XhmikosR/archive-type.git"},"publishConfig":{"access":"public"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=20"},"scripts":{"ava":"ava","lint":"xo","xo":"xo","fix":"xo --fix","test":"npm run ava"},"main":"index.js","type":"module","exports":{".":"./index.js"},"keywords":["7zip","archive","buffer","bz2","bzip2","check","detect","gz","gzip","mime","rar","zip","zst","zstd","file","type"],"dependencies":{"file-type":"^21.3.0"},"devDependencies":{"ava":"^6.4.1","xo":"^1.2.3"},"xo":{"rules":{"unicorn/prevent-abbreviations":"off"}},"gitHead":"7b0baa97c85b028bdd32703d5037091f782344d8","_id":"@xhmikosr/archive-type@8.0.1","bugs":{"url":"https://github.com/XhmikosR/archive-type/issues"},"homepage":"https://github.com/XhmikosR/archive-type#readme","_nodeVersion":"24.13.1","_npmVersion":"11.8.0","dist":{"integrity":"sha512-toXuiWChyfOpEiCPsIw6HGHaNji5LVkvB6EREL548vGWr+hGaehwxG4LzN20vm9aGFXwnA/Jty8yW2/SmV+1zQ==","shasum":"ef2db3325fc2e47d46fb8381b6316e16eec37894","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@xhmikosr/archive-type/-/archive-type-8.0.1.tgz","fileCount":4,"unpackedSize":3743,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDTReCPFHWDBWEdIU1JtAKqi9L6rfQyCFnGOUC9im/X5AIgKVPj4AVKDjND2Ly4WdM/XzgEvAi9BjJQlbR5+hxpUKw="}],"size":2044},"_npmUser":{"name":"anonymous","email":"xhmikosr@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"xhmikosr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/archive-type_8.0.1_1771958328958_0.6047844405455272"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-24T18:38:49.110Z","publish_time":1771958329110,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"8.0.1"},"name":"@xhmikosr/archive-type","time":{"created":"2023-06-01T14:40:14.566Z","modified":"2026-02-24T18:39:02.807Z","5.0.0":"2023-06-01T13:42:43.987Z","6.0.0":"2023-06-05T11:36:01.435Z","6.0.1":"2023-06-05T13:52:53.430Z","7.0.0":"2024-04-01T06:12:26.699Z","7.1.0":"2025-07-22T13:45:15.488Z","8.0.0":"2026-02-24T17:22:25.724Z","8.0.1":"2026-02-24T18:38:49.110Z"},"readme":"# archive-type [![npm version](https://img.shields.io/npm/v/@xhmikosr/archive-type?logo=npm&logoColor=fff)](https://www.npmjs.com/package/@xhmikosr/archive-type) [![CI Status](https://img.shields.io/github/actions/workflow/status/XhmikosR/archive-type/ci.yml?branch=master&label=CI&logo=github)](https://github.com/XhmikosR/archive-type/actions/workflows/ci.yml?query=branch%3Amaster)\n\n> Detect the archive type of a Buffer/Uint8Array\n\n\n## Install\n\n```sh\nnpm install @xhmikosr/archive-type\n```\n\n\n## Usage\n\n```js\nimport archiveType from '@xhmikosr/archive-type';\nimport {readChunk} from 'read-chunk';\n\nconst buffer = await readChunk('unicorn.zip', 0, 262);\n\nawait archiveType(buffer);\n//=> {ext: 'zip', mime: 'application/zip'}\n```\n\n\n## API\n\n### archiveType(input)\n\nReturns an `Object` with:\n\n- `ext` - One of the [supported file types](#supported-file-types)\n- `mime` - The [MIME type](https://en.wikipedia.org/wiki/Media_type)\n\nOr `null` when no match.\n\n#### input\n\nType: `Buffer` `Uint8Array`\n\nIt only needs the first 262 bytes.\n\n\n## Supported file types\n\n- `7z`\n- `bz2`\n- `gz`\n- `rar`\n- `tar`\n- `zip`\n- `xz`\n- `gz`\n- `zst`\n\n\n## Related\n\n- [archive-type-cli](https://github.com/kevva/archive-type-cli) - CLI for this module\n\n\n## License\n\nMIT © [Kevin Mårtensson](https://github.com/kevva)","users":{}}