{"_id":"@awesome-compressor/browser-compress-image","_rev":"6-565b093d1b1eaebbbb3efab7b7866a4e","name":"@awesome-compressor/browser-compress-image","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.1":{"name":"@awesome-compressor/browser-compress-image","version":"0.0.1","keywords":["image-compression","browser","compress","optimization","typescript","jpeg","png","gif","webp","file-size-reduction","frontend","web-performance","image-optimization","base64","arraybuffer","blob","file-processing","zero-dependencies","lightweight","modern"],"author":{"url":"https://github.com/Simon-He95","name":"Simon He","email":"simon.he.dev@gmail.com"},"license":"MIT","_id":"@awesome-compressor/browser-compress-image@0.0.1","maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"homepage":"https://github.com/awesome-compressor/browser-compress-image#readme","bugs":{"url":"https://github.com/awesome-compressor/browser-compress-image/issues"},"dist":{"shasum":"0e7b82322c283edf7744fe22b06a603ffb1059de","tarball":"https://registry.npmjs.org/@awesome-compressor/browser-compress-image/-/browser-compress-image-0.0.1.tgz","fileCount":5,"integrity":"sha512-1/g5Ry4BVHS55yUzfcoyLCWoBSXO+2KCyrNc2i5uPnnMrtQ35fqUSAyAV5BA57OxXhApJiIHlgfKRiX1TL6Cug==","signatures":[{"sig":"MEQCICgP8yCDDwR8f6/+yGYsQiNcHyv8RNhlQXf1nPsDqGqNAiAERcOl7C4FpWAt7QGLwy/s1RR8sBKBMUa0TcAc6hSItw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43670},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"b550ac750c2054b91985e195f97d8d3bcb0550a2","scripts":{"dev":"pnpm run -C playground dev","lint":"prettier --cache --write .","play":"pnpm run -C playground dev","test":"vitest --dir test -u","build":"tsdown","ptest":"pnpm run -C playground test -u","preview":"pnpm run -C playground preview","release":"bumpp --commit --tag --push && git push origin --tags -f && npm publish","test:e2e":"cypress open","play:build":"pnpm run -C playground build","prepublishOnly":"nr build"},"_npmUser":{"name":"simon_he","actor":{"name":"simon_he","type":"user","email":"13917107469@163.com"},"email":"13917107469@163.com"},"prettier":"@sxzz/prettier-config","repository":{"url":"git+https://github.com/awesome-compressor/browser-compress-image.git","type":"git"},"_npmVersion":"10.8.1","description":"🚀 A powerful, lightweight browser image compression library with TypeScript support. Compress JPEG, PNG, GIF images with multiple output formats (Blob, File, Base64, ArrayBuffer) and zero dependencies.","directories":{},"_nodeVersion":"20.16.0","dependencies":{"compressorjs":"^1.2.1","gifsicle-wasm-browser":"^1.5.16","browser-image-compression":"^2.0.2"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.12.4","devDependencies":{"bumpp":"^7.2.0","eslint":"^9.30.1","tsdown":"^0.12.9","vitest":"^3.2.4","prettier":"^3.6.2","typescript":"^4.9.5","@types/node":"^17.0.45","@antfu/eslint-config":"^4.16.2","@sxzz/prettier-config":"^2.2.3"},"_npmOperationalInternal":{"tmp":"tmp/browser-compress-image_0.0.1_1751962131767_0.16784853586059634","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@awesome-compressor/browser-compress-image","version":"0.0.2","keywords":["image-compression","browser","compress","optimization","typescript","jpeg","png","gif","webp","file-size-reduction","frontend","web-performance","image-optimization","base64","arraybuffer","blob","file-processing","zero-dependencies","lightweight","modern"],"author":{"url":"https://github.com/Simon-He95","name":"Simon He","email":"simon.he.dev@gmail.com"},"license":"MIT","_id":"@awesome-compressor/browser-compress-image@0.0.2","maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"homepage":"https://github.com/awesome-compressor/browser-compress-image#readme","bugs":{"url":"https://github.com/awesome-compressor/browser-compress-image/issues"},"dist":{"shasum":"7ce3882beba7882e56a8706a6edacba8c126175d","tarball":"https://registry.npmjs.org/@awesome-compressor/browser-compress-image/-/browser-compress-image-0.0.2.tgz","fileCount":5,"integrity":"sha512-K/2RBPUb3lAUUHSxGTBKiKPe9u3fX/GBCSjS8896PbLDn9Yg8QNvZu5A25nxie0VMYPDUDPVvKKJX144Cusdiw==","signatures":[{"sig":"MEUCIQCkEsQP3dM29ga5XL1crzkniacolRAcsAzgb6IkdJCtqQIgDjum2ELceFpKC5lwCIuC97lL6aO7yaL0JZ5+9CMFpUA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43962},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"eff4e08f509d865b95c3e10f48862c8dfcc1a506","scripts":{"dev":"pnpm run -C playground dev","lint":"prettier --cache --write .","play":"pnpm run -C playground dev","test":"vitest --dir test -u","build":"tsdown","ptest":"pnpm run -C playground test -u","preview":"pnpm run -C playground preview","release":"bumpp --commit --tag --push && git push origin --tags -f && npm publish","test:e2e":"cypress open","play:build":"pnpm run -C playground build","prepublishOnly":"nr build"},"_npmUser":{"name":"simon_he","actor":{"name":"simon_he","type":"user","email":"13917107469@163.com"},"email":"13917107469@163.com"},"prettier":"@sxzz/prettier-config","repository":{"url":"git+https://github.com/awesome-compressor/browser-compress-image.git","type":"git"},"_npmVersion":"10.8.1","description":"🚀 A powerful, lightweight browser image compression library with TypeScript support. Compress JPEG, PNG, GIF images with multiple output formats (Blob, File, Base64, ArrayBuffer) and zero dependencies.","directories":{},"_nodeVersion":"20.16.0","dependencies":{"compressorjs":"^1.2.1","gifsicle-wasm-browser":"^1.5.16","browser-image-compression":"^2.0.2"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.12.4","devDependencies":{"bumpp":"^7.2.0","eslint":"^9.30.1","tsdown":"^0.12.9","vitest":"^3.2.4","prettier":"^3.6.2","typescript":"^4.9.5","@types/node":"^17.0.45","@antfu/eslint-config":"^4.16.2","@sxzz/prettier-config":"^2.2.3"},"_npmOperationalInternal":{"tmp":"tmp/browser-compress-image_0.0.2_1751972927401_0.9522215630236062","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@awesome-compressor/browser-compress-image","version":"0.0.3","keywords":["image-compression","browser","compress","optimization","typescript","jpeg","png","gif","webp","file-size-reduction","frontend","web-performance","image-optimization","base64","arraybuffer","blob","file-processing","zero-dependencies","lightweight","modern"],"author":{"url":"https://github.com/Simon-He95","name":"Simon He","email":"simon.he.dev@gmail.com"},"license":"MIT","_id":"@awesome-compressor/browser-compress-image@0.0.3","maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"homepage":"https://github.com/awesome-compressor/browser-compress-image#readme","bugs":{"url":"https://github.com/awesome-compressor/browser-compress-image/issues"},"dist":{"shasum":"8d10c1ae7585dac92333c38927adddb60a0aab8f","tarball":"https://registry.npmjs.org/@awesome-compressor/browser-compress-image/-/browser-compress-image-0.0.3.tgz","fileCount":18,"integrity":"sha512-g2RmrhFhh8qRFTJxdcT0frF71lqJIygoSAQ3zF9+6rseEg9e0+MVmxYmJcWlGQyHswLUmLSvewaw11PkLqwv3g==","signatures":[{"sig":"MEUCIQCMqpTwQT8HRYzvlCTTGwmRz5ycxjjeP8WpqXTDIv/C/AIgNm3DBST76BUaRhw2WcAVkBDg4cq+Gs++GpMuiiNTZJQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":103674},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"f228bf4a8dbefdd6f87cadfe61331b8a489124ec","scripts":{"dev":"pnpm run -C playground dev","lint":"prettier --cache --write .","play":"pnpm run -C playground dev","test":"vitest --dir test -u","build":"tsdown","ptest":"pnpm run -C playground test -u","preview":"pnpm run -C playground preview","release":"bumpp --commit --tag --push && git push origin --tags -f && npm publish","test:e2e":"cypress open","typecheck":"tsc --noEmit","play:build":"pnpm run -C playground build","prepublishOnly":"nr build"},"_npmUser":{"name":"simon_he","email":"13917107469@163.com"},"prettier":"@sxzz/prettier-config","repository":{"url":"git+https://github.com/awesome-compressor/browser-compress-image.git","type":"git"},"_npmVersion":"10.8.1","description":"🚀 A powerful, lightweight browser image compression library with TypeScript support. Compress JPEG, PNG, GIF images with multiple output formats (Blob, File, Base64, ArrayBuffer) and zero dependencies.","directories":{},"_nodeVersion":"20.16.0","dependencies":{"compressorjs":"^1.2.1","gifsicle-wasm-browser":"^1.5.16","browser-image-compression":"^2.0.2"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.13.1","devDependencies":{"bumpp":"^7.2.0","eslint":"^9.31.0","tsdown":"^0.12.9","vitest":"^3.2.4","prettier":"^3.6.2","typescript":"^5.8.3","@types/node":"^17.0.45","@antfu/eslint-config":"^4.16.2","@sxzz/prettier-config":"^2.2.3"},"_npmOperationalInternal":{"tmp":"tmp/browser-compress-image_0.0.3_1752476223412_0.7922644951674365","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@awesome-compressor/browser-compress-image","version":"0.0.4","keywords":["image-compression","browser","compress","optimization","typescript","jpeg","png","gif","webp","file-size-reduction","frontend","web-performance","image-optimization","base64","arraybuffer","blob","file-processing","zero-dependencies","lightweight","modern"],"author":{"url":"https://github.com/Simon-He95","name":"Simon He","email":"simon.he.dev@gmail.com"},"license":"MIT","_id":"@awesome-compressor/browser-compress-image@0.0.4","maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"homepage":"https://github.com/awesome-compressor/browser-compress-image#readme","bugs":{"url":"https://github.com/awesome-compressor/browser-compress-image/issues"},"dist":{"shasum":"0f66fd30c01ad4d274d86275dfde72e57ad3ef88","tarball":"https://registry.npmjs.org/@awesome-compressor/browser-compress-image/-/browser-compress-image-0.0.4.tgz","fileCount":23,"integrity":"sha512-HI2cPet+zjzAGbEHp3VdXx9eZfzLg9SPRXUNEvU7WFGLbSb6vC20rMHU1slPmi7+So0VasW08H2d5PB6zXiwEw==","signatures":[{"sig":"MEUCIQC4E/NpAvCrOU4wRsyg+wqfRI9t/ZKR1APveRbFZZvK4AIgN7kDlaik/enuL7XrVIui7DvfTePQ7f11qk889L7mfHc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":116294},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./tools":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./utils":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./conversion":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"6c92503d5e042005d2dd5d32f2ce40153df014b3","scripts":{"dev":"pnpm run -C playground dev","lint":"prettier --cache --write .","play":"pnpm run -C playground dev","test":"vitest --dir test -u","build":"tsdown --minify","ptest":"pnpm run -C playground test -u","preview":"pnpm run -C playground preview","release":"bumpp --commit --tag --push && git push origin --tags -f && npm publish","test:ci":"vitest --dir test -u","test:e2e":"cypress open","typecheck":"tsc --noEmit","play:build":"pnpm run -C playground build","prepublishOnly":"nr build"},"_npmUser":{"name":"simon_he","email":"13917107469@163.com"},"prettier":"@sxzz/prettier-config","repository":{"url":"git+https://github.com/awesome-compressor/browser-compress-image.git","type":"git"},"_npmVersion":"10.9.2","description":"🚀 A powerful, lightweight browser image compression library with TypeScript support. Compress JPEG, PNG, GIF images with multiple output formats (Blob, File, Base64, ArrayBuffer) and zero dependencies.","directories":{},"sideEffects":false,"_nodeVersion":"23.7.0","dependencies":{"compressorjs":"^1.2.1","gifsicle-wasm-browser":"^1.5.16","browser-image-compression":"^2.0.2"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.18.1","devDependencies":{"bumpp":"^7.2.0","eslint":"^9.37.0","tsdown":"^0.12.9","vitest":"^3.2.4","prettier":"^3.6.2","typescript":"^5.9.3","@types/node":"^17.0.45","@antfu/eslint-config":"^4.19.0","@sxzz/prettier-config":"^2.2.4"},"_npmOperationalInternal":{"tmp":"tmp/browser-compress-image_0.0.4_1759910696518_0.7469309642560316","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@awesome-compressor/browser-compress-image","version":"0.0.5","keywords":["image-compression","browser","compress","optimization","typescript","jpeg","png","gif","webp","file-size-reduction","frontend","web-performance","image-optimization","base64","arraybuffer","blob","file-processing","lightweight","modern"],"author":{"url":"https://github.com/Simon-He95","name":"Simon He","email":"simon.he.dev@gmail.com"},"license":"MIT","_id":"@awesome-compressor/browser-compress-image@0.0.5","maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"homepage":"https://github.com/awesome-compressor/browser-compress-image#readme","bugs":{"url":"https://github.com/awesome-compressor/browser-compress-image/issues"},"dist":{"shasum":"0dbd74ec24144dddd97422d87b01c929257bb17f","tarball":"https://registry.npmjs.org/@awesome-compressor/browser-compress-image/-/browser-compress-image-0.0.5.tgz","fileCount":24,"integrity":"sha512-qWaHFzFdGyp60gAVh5fsjdA3j7kN8O/G/cnb8SgEx0kzOcdyA+OV8iVbhFsYKAMrYEekVaN6ZOFBB8kgqruDjQ==","signatures":[{"sig":"MEUCIQDYO41Wwzyv62XVWUJpBPEww4Nk74XvD4x31HeTDX2cfAIgVrvS6lalGGqhL24FurYFmNJfR+OB8OGVRDtq+88Na94=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":119373},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./tools":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./utils":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./conversion":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"baaf7bcb308a3f52e24d9b4381f3e507ccf9c77d","scripts":{"dev":"pnpm run -C playground dev","lint":"git ls-files -z | xargs -0 prettier --write --ignore-unknown","play":"pnpm run -C playground dev","test":"vitest --dir test -u","build":"tsdown --minify","ptest":"pnpm run -C playground test -u","preview":"pnpm run -C playground preview","release":"bumpp --commit --tag --push && git push origin --tags -f && npm publish","test:ci":"vitest --dir test -u","test:e2e":"cypress open","typecheck":"tsc --noEmit","play:build":"pnpm run -C playground build","prepublishOnly":"pnpm build"},"_npmUser":{"name":"simon_he","email":"13917107469@163.com"},"prettier":"@sxzz/prettier-config","repository":{"url":"git+https://github.com/awesome-compressor/browser-compress-image.git","type":"git"},"_npmVersion":"10.9.2","description":"Browser image compression library with TypeScript support, multiple output types, and pluggable tool selection.","directories":{},"_nodeVersion":"23.11.0","dependencies":{"compressorjs":"^1.2.1","gifsicle-wasm-browser":"^1.5.16","browser-image-compression":"^2.0.2"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.18.1","devDependencies":{"bumpp":"^7.2.0","eslint":"^9.37.0","tsdown":"^0.12.9","vitest":"^3.2.4","prettier":"^3.6.2","typescript":"^5.9.3","@types/node":"^17.0.45","@antfu/eslint-config":"^4.19.0","@sxzz/prettier-config":"^2.2.4"},"_npmOperationalInternal":{"tmp":"tmp/browser-compress-image_0.0.5_1776236269627_0.11937752798549806","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@awesome-compressor/browser-compress-image","type":"module","version":"0.0.6","description":"Browser image compression library with TypeScript support, multiple output types, and pluggable tool selection.","author":{"name":"Simon He","email":"simon.he.dev@gmail.com","url":"https://github.com/Simon-He95"},"license":"MIT","homepage":"https://github.com/awesome-compressor/browser-compress-image#readme","repository":{"type":"git","url":"git+https://github.com/awesome-compressor/browser-compress-image.git"},"bugs":{"url":"https://github.com/awesome-compressor/browser-compress-image/issues"},"keywords":["image-compression","browser","compress","optimization","typescript","jpeg","png","gif","webp","file-size-reduction","frontend","web-performance","image-optimization","base64","arraybuffer","blob","file-processing","lightweight","modern"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./tools":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./conversion":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"},"./utils":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","dependencies":{"browser-image-compression":"^2.0.2","compressorjs":"^1.2.1","gifsicle-wasm-browser":"^1.5.16"},"devDependencies":{"@antfu/eslint-config":"^4.19.0","@sxzz/prettier-config":"^2.2.4","@types/node":"^17.0.45","bumpp":"^7.2.0","eslint":"^9.37.0","prettier":"^3.6.2","tsdown":"^0.12.9","typescript":"^5.9.3","vitest":"^3.2.4","yaml":"^2.8.1"},"prettier":"@sxzz/prettier-config","scripts":{"build":"tsdown --minify","docs:generate":"node ./scripts/generate-status-doc.mjs","docs:check":"node ./scripts/generate-status-doc.mjs --check","package:check":"node ./scripts/check-package-contract.mjs","play":"pnpm run -C playground dev","dev":"pnpm run -C playground dev","play:build":"pnpm run -C playground build","lint":"git ls-files -z | xargs -0 prettier --write --ignore-unknown","test":"vitest --dir test -u","test:ci":"vitest --dir test -u","ptest":"pnpm run -C playground test -u","preview":"pnpm run -C playground preview","test:e2e":"cypress open","typecheck":"tsc --noEmit","release":"bumpp --commit --tag --push && git push origin --tags -f && npm publish"},"_id":"@awesome-compressor/browser-compress-image@0.0.6","_integrity":"sha512-6+ShP9yIzfDnTph8hRiYuQ64Uwc6Izxz58eauzWYtYEHe/o+CnsvZ6Zl2XF8I+kvg83kHodDtnNkyeI/6OF1+A==","_resolved":"/private/var/folders/z8/w1qvd0cd46z6k8_swl1n33d00000gn/T/43137b1b8039fcfba0133061051455c2/awesome-compressor-browser-compress-image-0.0.6.tgz","_from":"file:awesome-compressor-browser-compress-image-0.0.6.tgz","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-6+ShP9yIzfDnTph8hRiYuQ64Uwc6Izxz58eauzWYtYEHe/o+CnsvZ6Zl2XF8I+kvg83kHodDtnNkyeI/6OF1+A==","shasum":"799ac8a7f5d450b1ce30b174705706a0b75523ee","tarball":"https://registry.npmjs.org/@awesome-compressor/browser-compress-image/-/browser-compress-image-0.0.6.tgz","fileCount":25,"unpackedSize":115124,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD3XgRsOH1Up0Sw6dy0DZDlgEt/faAppVl9+GrRsc8x8wIhAPS5pmAm7gOZgrEcqbuCJWmwmad5Ly8RWhsb3AeWNqys"}]},"_npmUser":{"name":"simon_he","email":"13917107469@163.com"},"directories":{},"maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/browser-compress-image_0.0.6_1776757967696_0.2325193703288002"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-08T08:08:51.662Z","modified":"2026-04-21T07:52:48.024Z","0.0.1":"2025-07-08T08:08:51.942Z","0.0.2":"2025-07-08T11:08:47.623Z","0.0.3":"2025-07-14T06:57:03.581Z","0.0.4":"2025-10-08T08:04:56.734Z","0.0.5":"2026-04-15T06:57:49.765Z","0.0.6":"2026-04-21T07:52:47.841Z"},"bugs":{"url":"https://github.com/awesome-compressor/browser-compress-image/issues"},"author":{"name":"Simon He","email":"simon.he.dev@gmail.com","url":"https://github.com/Simon-He95"},"license":"MIT","homepage":"https://github.com/awesome-compressor/browser-compress-image#readme","keywords":["image-compression","browser","compress","optimization","typescript","jpeg","png","gif","webp","file-size-reduction","frontend","web-performance","image-optimization","base64","arraybuffer","blob","file-processing","lightweight","modern"],"repository":{"type":"git","url":"git+https://github.com/awesome-compressor/browser-compress-image.git"},"description":"Browser image compression library with TypeScript support, multiple output types, and pluggable tool selection.","maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"readme":"<div align=\"center\">\n  <img src=\"./assets/kv.png\" width=\"120\" alt=\"Browser Compress\">\n\n### Browser Compress Image\n\n</div>\n\n# Browser Compress Image\n\n一个浏览器端图片压缩库，支持多压缩路径、多输出类型、目标驱动压缩、队列化增\n强压缩，以及生成式状态页、行为契约文档和基线可选的评估流程。\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@awesome-compressor/browser-compress-image\"><img src=\"https://img.shields.io/npm/v/@awesome-compressor/browser-compress-image.svg?style=flat&colorA=18181B&colorB=28CF8D\" alt=\"Version\"></a>\n  <a href=\"https://www.npmjs.com/package/@awesome-compressor/browser-compress-image\"><img src=\"https://img.shields.io/npm/dm/@awesome-compressor/browser-compress-image.svg?style=flat&colorA=18181B&colorB=28CF8D\" alt=\"Downloads\"></a>\n  <a href=\"https://github.com/Simon-He95/browser-compress-image\"><img src=\"https://img.shields.io/github/stars/Simon-He95/browser-compress-image.svg?style=flat&colorA=18181B&colorB=28CF8D\" alt=\"Stars\"></a>\n  <a href=\"https://github.com/Simon-He95/browser-compress-image/blob/main/LICENSE\"><img src=\"https://img.shields.io/github/license/Simon-He95/browser-compress-image.svg?style=flat&colorA=18181B&colorB=28CF8D\" alt=\"License\"></a>\n</p>\n\n> 当前状态（npm `0.0.5`）：主线程压缩、队列管理、预处理和多工具比对已经可\n> 直接使用；Worker 压缩仍然是实验性能力，默认关闭。\n\nREADME 现在只承担定位、安装、快速开始和状态入口。能力矩阵与公开行为契约\n统一放在 `docs/` 和 `specs/`。\n\n## 安装\n\n```bash\nnpm install @awesome-compressor/browser-compress-image\n```\n\n## 快速开始\n\n当你想拿到最终结果，同时保留工具选择、体积变化和决策解释时，用\n`compressDecision()`。\n\n```ts\nimport { compressDecision } from '@awesome-compressor/browser-compress-image'\n\nconst decision = await compressDecision(file, {\n  objective: {\n    targetBytes: 300 * 1024,\n    goal: 'balanced',\n    output: 'auto',\n  },\n  type: 'file',\n})\n\nconsole.log(decision.result)\nconsole.log(decision.bestTool)\nconsole.log(decision.outputDecision)\nconsole.log(decision.objectiveDecision)\n```\n\n当你想直接使用内建工具选择、只拿压缩结果时，用 `compress()`。\n\n```ts\nimport { compress } from '@awesome-compressor/browser-compress-image'\n\nconst result = await compress(file, {\n  quality: 0.8,\n  output: 'auto',\n  type: 'blob',\n})\n```\n\n当你想明确控制允许参与压缩的工具集合时，用 `compressWithTools()`。\n\n```ts\nimport {\n  compressWithTools,\n  registerCanvas,\n  registerCompressorJS,\n} from '@awesome-compressor/browser-compress-image'\n\nregisterCanvas()\nregisterCompressorJS()\n\nconst result = await compressWithTools(file, {\n  quality: 0.8,\n})\n```\n\n当你需要队列化执行和预处理时，用 `compressEnhanced()`。\n\n```ts\nimport { compressEnhanced } from '@awesome-compressor/browser-compress-image'\n\nconst result = await compressEnhanced(file, {\n  quality: 0.8,\n  useQueue: true,\n  preprocess: {\n    maxWidth: 1920,\n    maxHeight: 1080,\n  },\n})\n```\n\n当你需要任务句柄、取消和阶段订阅时，用 `compressJob()`。\n\n```ts\nimport { compressJob } from '@awesome-compressor/browser-compress-image'\n\nconst job = compressJob(file, {\n  quality: 0.8,\n})\n\njob.onStageChange((stage) => {\n  console.log(stage)\n})\n\nconst result = await job.promise\n```\n\n## 文档\n\n- 快速开始： [docs/quickstart.md](./docs/quickstart.md)\n- 路线图： [docs/roadmap.md](./docs/roadmap.md)\n- 提案总览： [docs/proposals.md](./docs/proposals.md)\n- 部署说明： [docs/deployment.md](./docs/deployment.md)\n- 场景推荐组合： [docs/presets.md](./docs/presets.md)\n- 性能与执行模型： [docs/performance.md](./docs/performance.md)\n- 生成的能力/状态页： [docs/status.md](./docs/status.md)\n- 工具配置指南： [docs/configuration-guide.md](./docs/configuration-guide.md)\n- 按需导入说明： [docs/tree-shaking-guide.md](./docs/tree-shaking-guide.md)\n\n## 契约与提案\n\n- 机器可读能力源： [specs/capabilities.yaml](./specs/capabilities.yaml)\n- 核心 API 契约： [specs/001-core-api-contract.md](./specs/001-core-api-contract.md)\n- Worker / 队列生命周期契约： [specs/002-worker-job-lifecycle.md](./specs/002-worker-job-lifecycle.md)\n- 打包 / 发布契约： [specs/003-packaging-and-release-contract.md](./specs/003-packaging-and-release-contract.md)\n- 目标驱动压缩契约： [specs/004-objective-driven-compression.md](./specs/004-objective-driven-compression.md)\n- Job 化压缩 API 契约： [specs/005-compress-job-api.md](./specs/005-compress-job-api.md)\n- 自动输出格式契约： [specs/006-auto-output-format.md](./specs/006-auto-output-format.md)\n- 离线 / 内网部署契约： [specs/007-offline-and-air-gapped-deployment.md](./specs/007-offline-and-air-gapped-deployment.md)\n- 评估与基线契约： [specs/008-evaluation-and-baselines.md](./specs/008-evaluation-and-baselines.md)\n- 决策型 API 契约： [specs/009-decision-api.md](./specs/009-decision-api.md)\n- Worker 策略 ADR： [adr/001-worker-strategy.md](./adr/001-worker-strategy.md)\n- 导出策略 ADR： [adr/002-export-strategy.md](./adr/002-export-strategy.md)\n\n## 当前要点\n\n- `preserveExif: true` 只会保留支持 EXIF 的内建工具\n- `output` 已提供 phase-1 `preserve | auto | jpeg | png | webp`\n- `objective` 已提供 phase-1 `targetBytes + goal + output`\n- `compressDecision()` 已提供 beta 级可解释单结果入口\n- `compressEnhanced()` 默认走队列化执行\n- `compressJob()` 已提供 beta 级任务句柄\n- `configureCompressionDeployment()` 已提供 beta 级统一部署配置\n- `assessQuality()` 和 `buildConversionColumn()` 已支持非原图 baseline 的评估\n- `compressEnhanced({ useWorker: true })` 是 best-effort，不是强制 worker-only\n- `docs/status.md` 才是能力矩阵和导出状态入口，不再由 README 手工维护\n\n## 贡献\n\n如果改动影响公开行为，请在同一个变更里同步更新对应的 `specs/*.md` 和\n`specs/capabilities.yaml`。\n\n## 许可证\n\n[MIT](./LICENSE) License © 2022-2025 [Simon He](https://github.com/Simon-He95)\n","readmeFilename":"README.md"}