-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: Optimize apng detection algorithm
- Reduce memory allocations by avoiding decoding buffer - Increase algorithm performance by: - replacing regex matching with index search - going through buffer one time instead of two
- Loading branch information
madtisa
committed
Aug 9, 2024
1 parent
3200f4c
commit 3e50b23
Showing
3 changed files
with
86 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ isApng(new Uint8Array(buffer)) | |
#### As old-school global script tag | ||
|
||
Url for latest version: `https://unpkg.com/is-apng`<br> | ||
Url for specific version: `https://unpkg.com/[email protected].0/dist/index.js` | ||
Url for specific version: `https://unpkg.com/[email protected].1/dist/index.js` | ||
|
||
```html | ||
<script src="https://unpkg.com/is-apng" type="text/javascript"></script> | ||
|
@@ -53,7 +53,7 @@ Url for specific version: `https://unpkg.com/[email protected]/dist/index.js` | |
#### As module | ||
|
||
Url for latest version: `https://unpkg.com/is-apng/dist/index.mjs`<br> | ||
Url for specific version: `https://unpkg.com/[email protected].0/dist/index.mjs` | ||
Url for specific version: `https://unpkg.com/[email protected].1/dist/index.mjs` | ||
|
||
```html | ||
<script type="module"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters