forked from external-repos/squoosh
Compare commits
1 Commits
avif-heade
...
precise-un
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd4e9fd107 |
@@ -19,11 +19,11 @@ function clamp(v, min, max) {
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
const suffix = ['B', 'KB', 'MB'];
|
const suffix = ['B', 'KiB', 'MiB'];
|
||||||
function prettyPrintSize(size) {
|
function prettyPrintSize(size) {
|
||||||
const base = Math.floor(Math.log2(size) / 10);
|
const base = Math.floor(Math.log2(size) / 10);
|
||||||
const index = clamp(base, 0, 2);
|
const index = clamp(base, 0, 2);
|
||||||
return (size / 2 ** (10 * index)).toFixed(2) + suffix[index];
|
return (size / 2 ** (10 * index)).toFixed(2) + ' ' + suffix[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
async function decodeFile(file) {
|
async function decodeFile(file) {
|
||||||
|
|||||||
@@ -8,15 +8,6 @@
|
|||||||
"value": "no-cache"
|
"value": "no-cache"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"source": "**/*.avif",
|
|
||||||
"headers": [
|
|
||||||
{
|
|
||||||
"key": "Content-Type",
|
|
||||||
"value": "image/avif"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"redirects": [{ "source": "/editor", "destination": "/" }]
|
"redirects": [{ "source": "/editor", "destination": "/" }]
|
||||||
|
|||||||
Reference in New Issue
Block a user