forked from external-repos/squoosh
Compare commits
6 Commits
console-fe
...
precise-un
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd4e9fd107 | ||
|
|
c3d05e0e2d | ||
|
|
0c848a33ad | ||
|
|
8b20aa5f14 | ||
|
|
a972dfdeed | ||
|
|
522449adc1 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@ node_modules
|
|||||||
*.css.d.ts
|
*.css.d.ts
|
||||||
build
|
build
|
||||||
*.o
|
*.o
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
# Auto-generated by lib/feature-plugin.js
|
# Auto-generated by lib/feature-plugin.js
|
||||||
src/features-worker/index.ts
|
src/features-worker/index.ts
|
||||||
|
|||||||
BIN
cli/.DS_Store
vendored
BIN
cli/.DS_Store
vendored
Binary file not shown.
1
cli/.gitignore
vendored
1
cli/.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
node_modules
|
node_modules
|
||||||
build
|
build
|
||||||
|
.DS_Store
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user