sindresorhus

is-progressive

Check if JPEG images are progressive

by sindresorhus

JavaScript

JavaScript90.6%
TypeScript9.4%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
71
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template
bjornstar

I went to update and one of the tests failed, but it wasn't entirely clear why it failed. One issue was that I used readableHighWaterMark, but that's not a guarantee that the chunk will be smaller. However, even fixing that, there was something wrong with doing on a readable stream from a buffer. To work around it, I used on the chunk. I also realized that we want to return earlier if the number of bytes read is >= . No need to parse the entire file or stream.

bjornstar · 2y ago
bjornstar

Continuing to work on changing Buffer usage to Uint8Array, we got a pretty decent performance improvement out of this one: Before After I pulled in for the function and used that instead of looping over every byte in the buffer one by one. I bumped the minimum version of node to 18 to match 's requirement. This is great because node v16 has an annoying limitation when a buffer references its own values. I added two new files to the fixtures that are over 65535 bytes so we can test to ensure streaming works across multiple chunks. It is CC licensed and I added a link to the license file. Also bumped devDependencies and updated the workflows to modern versions.

bjornstar · 2y ago
Structured data for AI agents

Repository: sindresorhus/is-progressive. Description: Check if JPEG images are progressive Stars: 197, Forks: 6. Primary language: JavaScript. Languages: JavaScript (90.6%), TypeScript (9.4%). License: MIT. Latest release: v5.0.1 (2y ago). Open PRs: 0, open issues: 0. Last activity: 2y ago. Community health: 71%. Top contributors: sindresorhus, bjornstar, BendingBender, Richienb, SamVerschueren, icyflame, olizilla.