{"_id":"@nktkas/bmp","_rev":"11-f5269313cb7653aa531a22f91d08b4d4","name":"@nktkas/bmp","dist-tags":{"latest":"5.0.0"},"versions":{"1.0.0":{"name":"@nktkas/bmp","version":"1.0.0","keywords":["bmp","bitmap","decoder","image"],"author":{"url":"https://github.com/nktkas","name":"nktkas","email":"github.turk9@passmail.net"},"license":"MIT","_id":"@nktkas/bmp@1.0.0","maintainers":[{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"}],"homepage":"https://github.com/nktkas/bmp","bugs":{"url":"https://github.com/nktkas/bmp/issues"},"dist":{"shasum":"fa01a5acf212225b6e4213ea56e2938c9611efa5","tarball":"https://registry.npmjs.org/@nktkas/bmp/-/bmp-1.0.0.tgz","fileCount":37,"integrity":"sha512-zlUYSTBgCRur0HE6/a2S16zGGc6ZHcsDMFFgWeihcuRW3o9/ImIqgRUTe5OgmS/OUvaaOfBkfshmAtvDe6WljQ==","signatures":[{"sig":"MEUCIF8JcJpBUUDwK80NOYmkxTcX6nglu/67bF6eYL3hWNr/AiEAxwo/g5rCPhxHRyyOkL0f/1XfyWj25RuKhLf0Emsw8Q0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nktkas%2fbmp@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":113601},"main":"./script/mod.js","types":"./script/mod.d.ts","module":"./esm/mod.js","exports":{".":{"import":"./esm/mod.js","require":"./script/mod.js"}},"gitHead":"4dff0ce446896f4ad665e4eab462d08f06a9e13f","scripts":{},"_npmUser":{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"},"repository":{"url":"git+https://github.com/nktkas/bmp.git","type":"git"},"_npmVersion":"11.6.0","description":"Decoding for any BMP file formats.","directories":{},"sideEffects":false,"_nodeVersion":"24.9.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bmp_1.0.0_1759330912572_0.7365294646487834","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@nktkas/bmp","version":"1.1.0","keywords":["bmp","bitmap","decoder","image"],"author":{"url":"https://github.com/nktkas","name":"nktkas","email":"github.turk9@passmail.net"},"license":"MIT","_id":"@nktkas/bmp@1.1.0","maintainers":[{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"}],"homepage":"https://github.com/nktkas/bmp","bugs":{"url":"https://github.com/nktkas/bmp/issues"},"dist":{"shasum":"1fcaf988252197f3fa08c284bff502058832e392","tarball":"https://registry.npmjs.org/@nktkas/bmp/-/bmp-1.1.0.tgz","fileCount":37,"integrity":"sha512-9DpiZjlrgKNHDdJ4Xn+DplG2zdb9LOklLnR5gl99RiekaELKyxi/0L/FTA6na/gUahZi/tT2ebex3tj7r1ibig==","signatures":[{"sig":"MEUCIAJVQ4yOP7SNDSttmQYtPcaXSSALNe4LmPbDA7yX5sg1AiEAuVjmWXE9ej8Ghcy/Rx0yhv5OfWQImOvNDTpOBbNmHDo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nktkas%2fbmp@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":143152},"main":"./script/mod.js","types":"./script/mod.d.ts","module":"./esm/mod.js","exports":{".":{"import":"./esm/mod.js","require":"./script/mod.js"}},"gitHead":"5bca9613aa3a977c9a9a65644af31c1cf7aefb0a","scripts":{},"_npmUser":{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"},"repository":{"url":"git+https://github.com/nktkas/bmp.git","type":"git"},"_npmVersion":"11.6.0","description":"Decoding for any BMP file formats.","directories":{},"sideEffects":false,"_nodeVersion":"24.9.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bmp_1.1.0_1759513011313_0.5255304666415541","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@nktkas/bmp","version":"1.2.0","keywords":["bmp","bitmap","encoder","decoder","image"],"author":{"url":"https://github.com/nktkas","name":"nktkas","email":"github.turk9@passmail.net"},"license":"MIT","_id":"@nktkas/bmp@1.2.0","maintainers":[{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"}],"homepage":"https://github.com/nktkas/bmp","bugs":{"url":"https://github.com/nktkas/bmp/issues"},"dist":{"shasum":"40ce4206b267d9f4503e69ed7a41f297048702f0","tarball":"https://registry.npmjs.org/@nktkas/bmp/-/bmp-1.2.0.tgz","fileCount":41,"integrity":"sha512-bUks7v0BO9qulCZRpkJj9isuBg+6IarGxP39FH2hAW83gpqdhUpgGCOAZvSA73VgPwPhd7EbWzhrlADLN/QsFw==","signatures":[{"sig":"MEYCIQCiAuIWSf/oIG3vwWt61gMo89gquH+N9x0EO1zevWji4QIhAOb1Fetzs5TY0GbFiwRRfxkbiCkBBWUYhU1xrTUOOlGY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nktkas%2fbmp@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":177832},"main":"./script/mod.js","types":"./script/mod.d.ts","module":"./esm/mod.js","exports":{".":{"import":"./esm/mod.js","require":"./script/mod.js"}},"gitHead":"96ee021bf401c36897cbc333dcfc63ffd964c580","scripts":{},"_npmUser":{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"},"repository":{"url":"git+https://github.com/nktkas/bmp.git","type":"git"},"_npmVersion":"11.6.0","description":"Full featured TypeScript library to read/write BMP files: any bit depth, RGB, indexed, RLE, 64bpp","directories":{},"sideEffects":false,"_nodeVersion":"24.9.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bmp_1.2.0_1760127697324_0.10398646110250231","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@nktkas/bmp","version":"1.2.1","keywords":["bmp","bitmap","encoder","decoder","image"],"author":{"url":"https://github.com/nktkas","name":"nktkas","email":"github.turk9@passmail.net"},"license":"MIT","_id":"@nktkas/bmp@1.2.1","maintainers":[{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"}],"homepage":"https://github.com/nktkas/bmp","bugs":{"url":"https://github.com/nktkas/bmp/issues"},"dist":{"shasum":"59eb2e99913abb3a51e1d51d8178f4c68b5a4831","tarball":"https://registry.npmjs.org/@nktkas/bmp/-/bmp-1.2.1.tgz","fileCount":41,"integrity":"sha512-WfF8df3BWIqiZrJWwqZVpsB5SYCQrYD1oMMBMq5ewuJxBr7fRCaAhTOehcCfzAuGKkNeLHnVUG7LjRbWsNgQ0A==","signatures":[{"sig":"MEUCID6W3G13ki5KVvK73XvovNalZy8NrZqKVtLiX/2oebO1AiEAiAsyrzS0H7J8mQbkm/2vmifGT7mZH+P/tvd1ZWKNRXE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nktkas%2fbmp@1.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":182388},"main":"./script/mod.js","types":"./script/mod.d.ts","module":"./esm/mod.js","exports":{".":{"import":"./esm/mod.js","require":"./script/mod.js"}},"gitHead":"4124b8fc003b1757e4e40033c9219a6f8388a93d","scripts":{},"_npmUser":{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"},"repository":{"url":"git+https://github.com/nktkas/bmp.git","type":"git"},"_npmVersion":"11.6.0","description":"Fast and lightweight BMP image encoder/decoder","directories":{},"sideEffects":false,"_nodeVersion":"24.9.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bmp_1.2.1_1760235347650_0.7375851519411258","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@nktkas/bmp","version":"1.3.0","keywords":["bmp","bitmap","encoder","decoder","image"],"author":{"url":"https://github.com/nktkas","name":"nktkas","email":"github.turk9@passmail.net"},"license":"MIT","_id":"@nktkas/bmp@1.3.0","maintainers":[{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"}],"homepage":"https://github.com/nktkas/bmp","bugs":{"url":"https://github.com/nktkas/bmp/issues"},"dist":{"shasum":"86f883c5be2cc1d47ffc5b33c7c938dc38270ca4","tarball":"https://registry.npmjs.org/@nktkas/bmp/-/bmp-1.3.0.tgz","fileCount":69,"integrity":"sha512-I4s585AWEe2bD7qEUhttHf1qH0T7gOhCG2DYFm2rnb4kIoL9btcAI+PsGs1C+NOQxhuXVj/M32T9F/SUDNwA/Q==","signatures":[{"sig":"MEUCIE/MkTkmY0N7jiTL/0fuW0Qdg61euR8cMAH6JrUKFrDFAiEAqQyVc8puJR1yeJydbJSeOytB8Eohhqdx9k2w20/7wgU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nktkas%2fbmp@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":322152},"main":"./script/mod.js","types":"./script/mod.d.ts","module":"./esm/mod.js","exports":{".":{"import":"./esm/mod.js","require":"./script/mod.js"}},"gitHead":"daab6fbd21a140653dfff7b06c026bdefe81f6f8","scripts":{},"_npmUser":{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"},"repository":{"url":"git+https://github.com/nktkas/bmp.git","type":"git"},"_npmVersion":"11.6.1","description":"Fast and lightweight BMP image encoder/decoder.","directories":{},"sideEffects":false,"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bmp_1.3.0_1762281875583_0.11477833443699526","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@nktkas/bmp","version":"1.3.1","keywords":["bmp","bitmap","encoder","decoder","image"],"author":{"url":"https://github.com/nktkas","name":"nktkas","email":"github.turk9@passmail.net"},"license":"MIT","_id":"@nktkas/bmp@1.3.1","maintainers":[{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"}],"homepage":"https://github.com/nktkas/bmp","bugs":{"url":"https://github.com/nktkas/bmp/issues"},"dist":{"shasum":"63ac391f211441013f38232648244b0d499bfdaf","tarball":"https://registry.npmjs.org/@nktkas/bmp/-/bmp-1.3.1.tgz","fileCount":271,"integrity":"sha512-LYPLKobyRWFJWbvT+nyuP/hvGojoXRcbhoet57Hn2p+y7+wm97YDY8XDY+7z0eNfpgcApPFmAla5Vrw+/gw75Q==","signatures":[{"sig":"MEUCIAiesNkeMNvs6zWBMX/V2Lw3R5b1UYvrN0CiR3mqmhiuAiEA5GtiJD16XBS2BawKSza3HY/V/Z20dVc9if/VfKqtxqA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nktkas%2fbmp@1.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1895989},"type":"module","engines":{"node":">=20.19.0"},"exports":{".":"./dist/mod.js","./decode":"./dist/decode/mod.js","./encode":"./dist/encode/mod.js"},"gitHead":"98cc97db000ab7d1dc1e12d589d9e9ed013f0244","scripts":{"test":"npx deno test -A || node --test","dev:fmt":"npx deno fmt && npx sort-package-json","dev:lint":"npx deno lint","dev:build":"npx tsc","bench:decode":"node --expose-gc ./tests/decode/bench.ts","bench:encode":"node --expose-gc ./tests/encode/bench.ts","dev:typecheck":"npx deno check"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6f58c386-c456-45f0-b3ed-bb16aa4c70bc"}},"repository":{"url":"git+https://github.com/nktkas/bmp.git","type":"git"},"_npmVersion":"11.6.2","description":"Fast and lightweight BMP image encoder/decoder.","directories":{},"sideEffects":false,"_nodeVersion":"24.11.1","_hasShrinkwrap":false,"devDependencies":{"sharp":"^0.34.5","bmp-js":"^0.1.0","bmp-ts":"^1.0.9","mitata":"^1.0.34","fast-bmp":"^4.0.1","bmpimagejs":"^1.0.4","pixelmatch":"^7.1.0","typescript":"^5.9.3","@cwasm/nsbmp":"^0.1.3","@types/bmp-js":"^0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/bmp_1.3.1_1763183991057_0.0435727954085543","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"@nktkas/bmp","version":"1.3.2","keywords":["bmp","bitmap","encoder","decoder","image"],"author":{"url":"https://github.com/nktkas","name":"nktkas","email":"github.turk9@passmail.net"},"license":"MIT","_id":"@nktkas/bmp@1.3.2","maintainers":[{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"}],"homepage":"https://github.com/nktkas/bmp","bugs":{"url":"https://github.com/nktkas/bmp/issues"},"dist":{"shasum":"c64dc10d6579ea8ad43d814a23b36cbf88dd38a6","tarball":"https://registry.npmjs.org/@nktkas/bmp/-/bmp-1.3.2.tgz","fileCount":149,"integrity":"sha512-69EkQ/y5VYeW7D6JZ3dn03Bz86OklxFdWXHho4/hfRcavw3TWE37KykLWhUWbwOLi72By5b2mlES8lv3TCpJgg==","signatures":[{"sig":"MEQCICoiyT8CTedLkjBBHZ26qM1sN7P96jqBcoVFmsLwMyzMAiADX02Zum+/iewKfrkjCCui+P0p1EKDht2L5VDS+JbFcQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nktkas%2fbmp@1.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":694086},"main":"./script/mod.js","types":"./script/mod.d.ts","module":"./esm/mod.js","engines":{"node":">=20.19.0"},"exports":{".":{"import":"./esm/mod.js","require":"./script/mod.js"},"./decode":{"import":"./esm/decode/mod.js","require":"./script/decode/mod.js"},"./encode":{"import":"./esm/encode/mod.js","require":"./script/encode/mod.js"}},"gitHead":"c24e499e00d0fc94d866c81c91af346ff91eb8d7","scripts":{},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6f58c386-c456-45f0-b3ed-bb16aa4c70bc"}},"repository":{"url":"git+https://github.com/nktkas/bmp.git","type":"git"},"_npmVersion":"11.6.2","description":"Fast and lightweight BMP image encoder/decoder.","directories":{},"sideEffects":false,"_nodeVersion":"24.11.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bmp_1.3.2_1764113720737_0.5044889452874024","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@nktkas/bmp","version":"2.0.0","keywords":["bmp","bitmap","encoder","decoder","image"],"author":{"url":"https://github.com/nktkas","name":"nktkas","email":"github.turk9@passmail.net"},"license":"MIT","_id":"@nktkas/bmp@2.0.0","maintainers":[{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"}],"homepage":"https://github.com/nktkas/bmp","bugs":{"url":"https://github.com/nktkas/bmp/issues"},"dist":{"shasum":"cbeaaa09c843e41ca5a2318b86fc9c513d6d82fe","tarball":"https://registry.npmjs.org/@nktkas/bmp/-/bmp-2.0.0.tgz","fileCount":149,"integrity":"sha512-qmtNUH/AlESUvngOP3dMSR5fESkY4lFg8eJA99B/E5D+qW0U3Mo74AonnV0y1UjcJZ8MnPoDErz4AG37IGBWbg==","signatures":[{"sig":"MEUCICfGVBL2enEhfwkUvXwtHBmLMLkfdtbGOfKG6jM56JMZAiEA6N1A4yNnnJWydgYbL+AmZ3Cff0sEzOGG27bkxGRWHhs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nktkas%2fbmp@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":551467},"main":"./script/mod.js","types":"./script/mod.d.ts","module":"./esm/mod.js","engines":{"node":">=20.19.0"},"exports":{".":{"import":"./esm/mod.js","require":"./script/mod.js"},"./decode":{"import":"./esm/decode/mod.js","require":"./script/decode/mod.js"},"./encode":{"import":"./esm/encode/mod.js","require":"./script/encode/mod.js"}},"gitHead":"2d9a41c5f2cb286694cf2de06c596cff26622bfc","scripts":{},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6f58c386-c456-45f0-b3ed-bb16aa4c70bc"}},"repository":{"url":"git+https://github.com/nktkas/bmp.git","type":"git"},"_npmVersion":"11.6.2","description":"A fast, lightweight, zero-dependency BMP image encoder/decoder written in pure JavaScript.","directories":{},"sideEffects":false,"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bmp_2.0.0_1771443974625_0.4244427105455455","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@nktkas/bmp","version":"3.0.0","keywords":["bmp","bitmap","encoder","decoder","image"],"author":{"url":"https://github.com/nktkas","name":"nktkas","email":"github.turk9@passmail.net"},"license":"MIT","_id":"@nktkas/bmp@3.0.0","maintainers":[{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"}],"homepage":"https://github.com/nktkas/bmp","bugs":{"url":"https://github.com/nktkas/bmp/issues"},"dist":{"shasum":"dc33026e356e398825d4d2d194ee34ae75c2185c","tarball":"https://registry.npmjs.org/@nktkas/bmp/-/bmp-3.0.0.tgz","fileCount":149,"integrity":"sha512-+Luf5eeflODn1mJZoskzWIoA6caOpfARSrlu2pf6MuoUT2cxxbH8fWsBnasSX2BE+sGHqrS8N3+0RAIKDtEtBg==","signatures":[{"sig":"MEYCIQDW5arRGlzRYAWzBCl6YUNl9Hs0RiMNA7H5Xao0C+fS3gIhAOygi6+OPs5zXVMe/uG9USIyy6jr5F51rLS8XVJ7Bzid","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nktkas%2fbmp@3.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":568192},"main":"./script/mod.js","types":"./script/mod.d.ts","module":"./esm/mod.js","engines":{"node":">=20.19.0"},"exports":{".":{"import":"./esm/mod.js","require":"./script/mod.js"},"./decode":{"import":"./esm/decode/mod.js","require":"./script/decode/mod.js"},"./encode":{"import":"./esm/encode/mod.js","require":"./script/encode/mod.js"}},"gitHead":"1e326f6809be730d0ec84399d77ce8d7bbbcd254","scripts":{},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6f58c386-c456-45f0-b3ed-bb16aa4c70bc"}},"repository":{"url":"git+https://github.com/nktkas/bmp.git","type":"git"},"_npmVersion":"11.6.2","description":"A fast, lightweight, zero-dependency BMP image encoder/decoder written in pure JavaScript.","directories":{},"sideEffects":false,"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bmp_3.0.0_1771911071242_0.11108173457071913","host":"s3://npm-registry-packages-npm-production"}},"4.0.0":{"name":"@nktkas/bmp","version":"4.0.0","keywords":["bmp","bitmap","encoder","decoder","image"],"author":{"url":"https://github.com/nktkas","name":"nktkas","email":"github.turk9@passmail.net"},"license":"MIT","_id":"@nktkas/bmp@4.0.0","maintainers":[{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"}],"homepage":"https://github.com/nktkas/bmp","bugs":{"url":"https://github.com/nktkas/bmp/issues"},"dist":{"shasum":"87284fa4f0e667028b0e006d305fd0c421412d3e","tarball":"https://registry.npmjs.org/@nktkas/bmp/-/bmp-4.0.0.tgz","fileCount":51,"integrity":"sha512-A5KSLUDHfD45PxUqXIs5SYafMSQ+wzq/7Woitp/+2u/RJg3r8IvDuner2WuCZkPGP0igcH5f7xny+yTDREQvxg==","signatures":[{"sig":"MEQCIG2fyko17vamPRY+gPCnYqjP/ifWef594WP84KE6J18RAiAtSOvx9ecy4EUpOay3viVyhz6n0rB1Gg9JC26yhsG83Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nktkas%2fbmp@4.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":314791},"main":"./esm/mod.js","type":"module","types":"./esm/mod.d.ts","engines":{"node":">=22.12.0"},"exports":{".":{"types":"./esm/mod.d.ts","default":"./esm/mod.js"},"./decode":{"types":"./esm/decode/mod.d.ts","default":"./esm/decode/mod.js"},"./encode":{"types":"./esm/encode/mod.d.ts","default":"./esm/encode/mod.js"}},"gitHead":"654634893d04255500821d8a395ee0603debf52e","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6f58c386-c456-45f0-b3ed-bb16aa4c70bc"}},"repository":{"url":"git+https://github.com/nktkas/bmp.git","type":"git"},"_npmVersion":"11.13.0","description":"A fast, lightweight, zero-dependency BMP image encoder/decoder written in pure JavaScript.","directories":{},"sideEffects":false,"_nodeVersion":"24.16.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bmp_4.0.0_1780713146856_0.4867576401406941","host":"s3://npm-registry-packages-npm-production"}},"5.0.0":{"name":"@nktkas/bmp","version":"5.0.0","description":"A fast, lightweight, zero-dependency BMP image encoder/decoder written in pure JavaScript.","keywords":["bmp","bitmap","encoder","decoder","image"],"homepage":"https://github.com/nktkas/bmp","bugs":{"url":"https://github.com/nktkas/bmp/issues"},"repository":{"type":"git","url":"git+https://github.com/nktkas/bmp.git"},"license":"MIT","author":{"name":"nktkas","email":"github.turk9@passmail.net","url":"https://github.com/nktkas"},"sideEffects":false,"type":"module","exports":{".":{"types":"./esm/mod.d.ts","default":"./esm/mod.js"},"./decode":{"types":"./esm/decode/mod.d.ts","default":"./esm/decode/mod.js"},"./encode":{"types":"./esm/encode/mod.d.ts","default":"./esm/encode/mod.js"}},"main":"./esm/mod.js","types":"./esm/mod.d.ts","engines":{"node":">=22.12.0"},"gitHead":"b4beadeb9ca7ab2de624478ce069cf85c383cb85","_id":"@nktkas/bmp@5.0.0","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-YRAfv3sVnumlmgd79YIPNsRIJ2Gr77iqsC/1oQXebYt1d0QU6rOWzO5TX+tG7dh8u4YPhZsvhBFkqUETXGf/vw==","shasum":"5a0c5dc0a4532a3d7ae5d72a83ed450c383ae0f1","tarball":"https://registry.npmjs.org/@nktkas/bmp/-/bmp-5.0.0.tgz","fileCount":51,"unpackedSize":418580,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nktkas%2fbmp@5.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIF7JINousxh2q1wakWcjDapM+UcEbjusw0LfermiLVXrAiEAwcpK2TJDq+UcjmpgUnp/iqi2FwfBs7lB9+7a305fQMc="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6f58c386-c456-45f0-b3ed-bb16aa4c70bc"}},"directories":{},"maintainers":[{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bmp_5.0.0_1788310262708_0.10199107112021855"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-01T15:01:52.451Z","modified":"2026-09-02T00:51:03.214Z","1.0.0":"2025-10-01T15:01:52.773Z","1.1.0":"2025-10-03T17:36:51.522Z","1.2.0":"2025-10-10T20:21:37.500Z","1.2.1":"2025-10-12T02:15:47.853Z","1.3.0":"2025-11-04T18:44:35.793Z","1.3.1":"2025-11-15T05:19:51.388Z","1.3.2":"2025-11-25T23:35:20.928Z","2.0.0":"2026-02-18T19:46:14.784Z","3.0.0":"2026-02-24T05:31:11.393Z","4.0.0":"2026-06-06T02:32:27.001Z","5.0.0":"2026-09-02T00:51:02.895Z"},"bugs":{"url":"https://github.com/nktkas/bmp/issues"},"author":{"name":"nktkas","email":"github.turk9@passmail.net","url":"https://github.com/nktkas"},"license":"MIT","homepage":"https://github.com/nktkas/bmp","keywords":["bmp","bitmap","encoder","decoder","image"],"repository":{"type":"git","url":"git+https://github.com/nktkas/bmp.git"},"description":"A fast, lightweight, zero-dependency BMP image encoder/decoder written in pure JavaScript.","maintainers":[{"name":"nktkas","email":"npmjs.kvd21@passinbox.com"}],"readme":"# BMP Encoder/Decoder\n\n[![npm](https://img.shields.io/npm/v/@nktkas/bmp)](https://www.npmjs.com/package/@nktkas/bmp)\n[![JSR](https://jsr.io/badges/@nktkas/bmp)](https://jsr.io/@nktkas/bmp)\n[![bundlejs](https://img.shields.io/bundlejs/size/@nktkas/bmp)](https://bundlejs.com/?q=@nktkas/bmp)\n\nA fast, lightweight, zero-dependency BMP image encoder/decoder written in pure JavaScript.\n\nWorks with:\n<img alt=\"browsers\" title=\"This package works with browsers.\" height=\"16px\" src=\"https://jsr.io/logos/browsers.svg\" />\n<img alt=\"Bun\" title=\"This package works with Bun.\" height=\"16px\" src=\"https://jsr.io/logos/bun.svg\" />\n<img alt=\"Deno\" title=\"This package works with Deno.\" height=\"16px\" src=\"https://jsr.io/logos/deno.svg\" />\n<img alt=\"Node.js\" title=\"This package works with Node.js\" height=\"16px\" src=\"https://jsr.io/logos/node.svg\" />\n<img alt=\"Cloudflare Workers\" title=\"This package works with Cloudflare Workers.\" height=\"16px\" src=\"https://jsr.io/logos/cloudflare-workers.svg\" />\n\n## Usage\n\n### Decode\n\nSupported BMP formats:\n\n- **Header types**: BITMAPCOREHEADER, OS22XBITMAPHEADER, BITMAPINFOHEADER, BITMAPV2–V5\n- **Compression**: BI_RGB, BI_RLE8, BI_RLE4, BI_BITFIELDS, BI_ALPHABITFIELDS, Modified Huffman, RLE24\n- **Bit depths**: 1, 2, 4, 8, 16, 24, 32, 64\n- **Row order**: top-down and bottom-up\n\n<sub>Full list of supported BMP formats [here](https://entropymine.com/jason/bmpsuite/bmpsuite/html/bmpsuite.html)</sub>\n\n#### Basic usage\n\n```ts\nimport { decode } from \"@nktkas/bmp\";\n\nconst file = new Uint8Array([/* ... BMP file bytes ... */]);\nconst raw = decode(file);\n// { width: 1, height: 1, channels: 3, data: Uint8Array(3) [0, 0, 0] }\n//                                  ^\n//                                  may be 1 (grayscale), 3 (RGB), or 4 (RGBA)\n```\n\n#### BI_JPEG / BI_PNG compressed images\n\nBMP files can embed JPEG or PNG data as pixel payload. Use `extractCompressedData` to get the embedded data, then decode\nit with any JPEG/PNG library.\n\n```ts\nimport { extractCompressedData } from \"@nktkas/bmp\";\n\nconst bmp = new Uint8Array([/* ... BMP file bytes with BI_PNG compression ... */]);\nconst extracted = extractCompressedData(bmp);\n// { width: 1, height: 1, compression: 5, data: Uint8Array(69) [...] }\n//                                     ^\n//                                     4 = BI_JPEG, 5 = BI_PNG\n\n// Then decode with any JPEG/PNG library\nimport sharp from \"sharp\";\nconst raw = await sharp(extracted.data).raw().toBuffer();\n```\n\n### Encode\n\nSupported encoding formats:\n\n- **Bit depths**: 1, 4, 8, 16, 24, 32\n- **Compression**: BI_RGB, BI_RLE8, BI_RLE4, BI_BITFIELDS, BI_ALPHABITFIELDS\n- **Header types**: BITMAPINFOHEADER, BITMAPV4HEADER, BITMAPV5HEADER\n- **Row order**: top-down and bottom-up\n\n#### Basic usage\n\n<!-- deno-fmt-ignore -->\n```ts\nimport { encode } from \"@nktkas/bmp\";\n\n// A minimal raw image\nconst raw = {\n  width: 2,\n  height: 2,\n  channels: 3, // 1 (grayscale), 3 (RGB), or 4 (RGBA)\n  data: new Uint8Array([ // 2x2 black and white pixels\n    0, 0, 0,  255, 255, 255,\n    0, 0, 0,  255, 255, 255,\n  ]),\n} as const;\n\n// Encode to 24-bit BMP (automatic detection of best settings based on raw data)\nconst bmp = encode(raw);\n//    ^^^\n//    Uint8Array([...]) containing the BMP file bytes\n```\n\n#### Advanced options\n\n```ts\ninterface EncodeOptions {\n  /**\n   * Bit depth to encode at.\n   *\n   * @default Follows `raw.channels`: 8 for grayscale, 24 for RGB, 32 for RGBA.\n   */\n  bitsPerPixel?: 1 | 4 | 8 | 16 | 24 | 32;\n\n  /**\n   * Compression method:\n   * - `0`: BI_RGB, uncompressed.\n   * - `1`: BI_RLE8, run-length encoded, 8bpp only.\n   * - `2`: BI_RLE4, run-length encoded, 4bpp only.\n   * - `3`: BI_BITFIELDS, channel masks, 16 or 32bpp.\n   * - `6`: BI_ALPHABITFIELDS, channel masks with alpha, 32bpp only.\n   *\n   * @default 0\n   */\n  compression?: 0 | 1 | 2 | 3 | 6;\n\n  /**\n   * DIB header format to write:\n   * - `BITMAPINFOHEADER` — 40 bytes, most compatible.\n   * - `BITMAPV4HEADER` — 108 bytes, includes masks and sRGB color space.\n   * - `BITMAPV5HEADER` — 124 bytes, adds ICC profile and rendering intent.\n   *\n   * @default \"BITMAPINFOHEADER\"\n   */\n  headerType?: HeaderType;\n\n  /**\n   * Store rows top-down instead of bottom-up.\n   *\n   * @default false\n   */\n  isTopDown?: boolean;\n\n  /**\n   * Palette for the indexed depths (1, 4, 8), holding at least as many colors as the depth addresses;\n   * anything past that count is dropped. Omitting it quantizes the image down to a palette of its own.\n   */\n  palette?: Color[];\n\n  /**\n   * Channel masks for the two bitfield compressions.\n   *\n   * @default RGB565 at 16bpp, BGRA8888 at 32bpp.\n   */\n  bitfields?: BitfieldMasks;\n}\n```\n\n<!-- deno-fmt-ignore -->\n```ts\nimport { encode } from \"@nktkas/bmp\";\n\n// A minimal raw image\nconst raw = {\n  width: 2,\n  height: 2,\n  channels: 3, // 1 (grayscale), 3 (RGB), or 4 (RGBA)\n  data: new Uint8Array([ // 2x2 black and white pixels\n    0, 0, 0,  255, 255, 255,\n    0, 0, 0,  255, 255, 255,\n  ]),\n} as const;\n\n// Encode to 8-bit indexed BMP with auto-generated 256-color palette\nconst bmp = encode(raw, { bitsPerPixel: 8 });\n//    ^^^\n//    Uint8Array([...]) containing the BMP file bytes\n```\n\n### Errors\n\nEvery failure is a `BmpError` with a `code`. An error raised outside the package is wrapped in one of these, with the\noriginal in `cause`.\n\n```ts\nimport { BmpError, decode, extractCompressedData } from \"@nktkas/bmp\";\n\nconst file = await Deno.readFile(\"image.bmp\");\n\ntry {\n  const raw = decode(file);\n} catch (error) {\n  if (!(error instanceof BmpError)) throw error;\n  if (error.code !== \"EMBEDDED_IMAGE\") throw error;\n\n  const { data, compression } = extractCompressedData(file);\n}\n```\n\n| Code                      |     Thrown by     | Meaning                                                                         |\n| ------------------------- | :---------------: | ------------------------------------------------------------------------------- |\n| `INVALID_SIGNATURE`       |     `decode`      | The bytes do not begin with a BMP file header.                                  |\n| `UNSUPPORTED_HEADER`      |     `decode`      | The DIB header size matches no BMP header version this package reads.           |\n| `UNSUPPORTED_DEPTH`       |     `decode`      | The BMP format defines no pixel layout for this depth under this compression.   |\n| `UNSUPPORTED_COMPRESSION` |     `decode`      | The compression method is one this package does not implement.                  |\n| `EMBEDDED_IMAGE`          |     `decode`      | The pixel data is a complete JPEG or PNG; `extractCompressedData` returns it.   |\n| `MALFORMED_FILE`          |     `decode`      | The file is shorter than its header declares; `cause` holds the original error. |\n| `INVALID_DATA_SIZE`       |     `encode`      | The pixel buffer length is not width × height × channels.                       |\n| `INCOMPATIBLE_OPTIONS`    |     `encode`      | The given depth, compression, row order and palette do not fit together.        |\n| `INVALID_DIMENSIONS`      | `decode`,`encode` | The dimensions are not positive, or too large to allocate a buffer for.         |\n\n## Benchmarks\n\nAll benchmarks run on procedurally generated 1024×1024 images.\n\nMilliseconds per operation (lower is better). **Bold** = fastest in row, `—` = unsupported.\n\n### Decode comparison\n\n<sub>Run command: `deno bench --allow-read bench/decode.bench.ts`</sub>\n\n| Format            | @nktkas/bmp | [@cwasm/nsbmp](https://www.npmjs.com/package/@cwasm/nsbmp) (WASM) | [bmpimagejs](https://www.npmjs.com/package/bmpimagejs) | [bmp-js](https://www.npmjs.com/package/bmp-js) | [fast-bmp](https://www.npmjs.com/package/fast-bmp) | [bmp-ts](https://www.npmjs.com/package/bmp-ts) |\n| ----------------- | :---------: | :---------------------------------------------------------------: | :----------------------------------------------------: | :--------------------------------------------: | :------------------------------------------------: | :--------------------------------------------: |\n| BI_RGB 1-bit      |   **1.4**   |                                2.4                                |                          2.7                           |                      2.8                       |                         —                          |                      3.5                       |\n| BI_RGB 1-bit (gs) |  **0.74**   |                                2.5                                |                          2.7                           |                      2.8                       |                         —                          |                      3.5                       |\n| BI_RGB 4-bit      |   **1.3**   |                                2.2                                |                          2.7                           |                      4.1                       |                         —                          |                      4.2                       |\n| BI_RGB 4-bit (gs) |  **0.47**   |                                1.9                                |                          2.3                           |                      3.8                       |                         —                          |                      4.2                       |\n| BI_RGB 8-bit      |   **1.1**   |                                1.7                                |                          2.5                           |                      4.4                       |                         —                          |                      6.2                       |\n| BI_RGB 8-bit (gs) |  **0.56**   |                                1.7                                |                          2.6                           |                      4.4                       |                        2.3                         |                      6.3                       |\n| BI_RGB 16-bit     |     1.6     |                              **1.5**                              |                           —                            |                      2.2                       |                         —                          |                      12.0                      |\n| BI_RGB 24-bit     |   **1.1**   |                                1.4                                |                          2.2                           |                      2.4                       |                        4.4                         |                      6.0                       |\n| BI_RGB 32-bit     |   **1.0**   |                                1.6                                |                          1.4                           |                      5.8                       |                         —                          |                      12.9                      |\n| BI_RLE4           |  **0.81**   |                               0.85                                |                          0.99                          |                       —                        |                         —                          |                       —                        |\n| BI_RLE8           |  **0.70**   |                               0.72                                |                          0.91                          |                       —                        |                         —                          |                       —                        |\n| BI_RLE8 (gs)      |  **0.22**   |                                1.2                                |                          1.2                           |                       —                        |                         —                          |                       —                        |\n| BI_BITFIELDS 16   |   **1.5**   |                                4.6                                |                           —                            |                       —                        |                         —                          |                      12.1                      |\n| BI_BITFIELDS 32   |   **1.9**   |                                4.3                                |                          4.0                           |                       —                        |                         —                          |                       —                        |\n\n### Encode comparison\n\n<sub>Run command: `deno bench bench/encode.bench.ts`</sub>\n\n| Format            | @nktkas/bmp | [fast-bmp](https://www.npmjs.com/package/fast-bmp) | [bmp-js](https://www.npmjs.com/package/bmp-js) |\n| ----------------- | :---------: | :------------------------------------------------: | :--------------------------------------------: |\n| BI_RGB 1-bit      |    12.2     |                         —                          |                       —                        |\n| BI_RGB 1-bit (gs) |    0.74     |                         —                          |                       —                        |\n| BI_RGB 4-bit      |     9.6     |                         —                          |                       —                        |\n| BI_RGB 4-bit (gs) |    0.89     |                         —                          |                       —                        |\n| BI_RGB 8-bit      |    38.4     |                         —                          |                       —                        |\n| BI_RGB 8-bit (gs) |  **0.08**   |                        3.4                         |                       —                        |\n| BI_RGB 16-bit     |     1.3     |                         —                          |                       —                        |\n| BI_RGB 24-bit     |   **1.3**   |                        8.2                         |                      1.4                       |\n| BI_RGB 32-bit     |     1.3     |                         —                          |                       —                        |\n| BI_RLE4           |     9.6     |                         —                          |                       —                        |\n| BI_RLE8           |    11.7     |                         —                          |                       —                        |\n| BI_RLE8 (gs)      |     2.2     |                         —                          |                       —                        |\n| BI_BITFIELDS 16   |     1.8     |                         —                          |                       —                        |\n| BI_BITFIELDS 32   |     4.0     |                         —                          |                       —                        |\n\n## License\n\n**@nktkas/bmp** is licensed under the [MIT License](LICENSE).\n\nCopyright © 2025-present [nktkas](https://github.com/nktkas).\n","readmeFilename":"README.md"}