Skip to content

Commit d679ae6

Browse files
committed
Upgrade h5wasm-plugins to support JPEG compression
1 parent 4d5f456 commit d679ae6

File tree

8 files changed

+24
-28
lines changed

8 files changed

+24
-28
lines changed

apps/demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@h5web/h5wasm": "workspace:*",
1818
"axios": "1.8.4",
1919
"axios-hooks": "5.1.1",
20-
"h5wasm-plugins": "0.0.3",
20+
"h5wasm-plugins": "0.1.0",
2121
"normalize.css": "8.0.1",
2222
"react": "18.3.1",
2323
"react-dom": "18.3.1",

apps/demo/src/h5wasm/plugin-utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import blosc from 'h5wasm-plugins/plugins/libH5Zblosc.so';
55
import blosc2 from 'h5wasm-plugins/plugins/libH5Zblosc2.so';
66
import bshuf from 'h5wasm-plugins/plugins/libH5Zbshuf.so';
77
import bz2 from 'h5wasm-plugins/plugins/libH5Zbz2.so';
8+
import jpeg from 'h5wasm-plugins/plugins/libH5Zjpeg.so';
89
import lz4 from 'h5wasm-plugins/plugins/libH5Zlz4.so';
910
import lzf from 'h5wasm-plugins/plugins/libH5Zlzf.so';
10-
import szf from 'h5wasm-plugins/plugins/libH5Zszf.so';
1111
import zfp from 'h5wasm-plugins/plugins/libH5Zzfp.so';
1212
import zstd from 'h5wasm-plugins/plugins/libH5Zzstd.so';
1313

@@ -16,9 +16,9 @@ const PLUGINS: Record<Plugin, string> = {
1616
[Plugin.Blosc2]: blosc2,
1717
[Plugin.Bitshuffle]: bshuf,
1818
[Plugin.BZIP2]: bz2,
19+
[Plugin.JPEG]: jpeg,
1920
[Plugin.LZ4]: lz4,
2021
[Plugin.LZF]: lzf,
21-
[Plugin.SZ]: szf,
2222
[Plugin.ZFP]: zfp,
2323
[Plugin.Zstandard]: zstd,
2424
};

packages/h5wasm/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ return:
147147

148148
`@h5web/h5wasm` is capable of identifying and requesting the plugins supported
149149
by the
150-
[`h5wasm-plugins@0.0.1`](https://github.com/h5wasm/h5wasm-plugins/tree/v0.0.1)
151-
package: `blosc`, `bz2`, `lz4`, `lzf`, `szf`, `zfp`, `zstd`.
150+
[`h5wasm-plugins@0.1.0`](https://github.com/h5wasm/h5wasm-plugins/tree/v0.1.0)
151+
package: `blosc`, `blosc2`, `bshuf`, `bz2`, `jpeg`, `lz4`, `lzf`, `zfp`, `zstd`.
152152

153153
A typical implementation of `getPlugin` in a bundled front-end application might
154154
look like this:

packages/h5wasm/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,21 @@
3737
},
3838
"peerDependencies": {
3939
"@h5web/app": "workspace:*",
40+
"h5wasm-plugins": "0.1.0",
4041
"react": ">=18",
4142
"typescript": ">=4.5"
4243
},
4344
"peerDependenciesMeta": {
45+
"h5wasm-plugins": {
46+
"optional": true
47+
},
4448
"typescript": {
4549
"optional": true
4650
}
4751
},
4852
"dependencies": {
4953
"comlink": "4.4.2",
50-
"h5wasm": "0.7.9",
54+
"h5wasm": "0.8.1",
5155
"nanoid": "5.1.5"
5256
},
5357
"devDependencies": {

packages/h5wasm/src/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export enum Plugin {
1111
Blosc = 'blosc',
1212
Blosc2 = 'blosc2',
1313
BZIP2 = 'bz2',
14+
JPEG = 'jpeg',
1415
LZ4 = 'lz4',
1516
LZF = 'lzf',
16-
SZ = 'szf',
1717
ZFP = 'zfp',
1818
Zstandard = 'zstd',
1919
}

packages/h5wasm/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const PLUGINS_BY_FILTER_ID: Record<number, Plugin> = {
99
32_008: Plugin.Bitshuffle,
1010
32_013: Plugin.ZFP,
1111
32_015: Plugin.Zstandard,
12-
32_017: Plugin.SZ,
12+
32_019: Plugin.JPEG,
1313
32_026: Plugin.Blosc2,
1414
};
1515

pnpm-lock.yaml

Lines changed: 11 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
"noImplicitOverride": true,
1717
"noImplicitReturns": true,
1818
"noFallthroughCasesInSwitch": true,
19-
"noUncheckedSideEffectImports": true,
20-
"forceConsistentCasingInFileNames": true,
21-
"useDefineForClassFields": true,
22-
"useUnknownInCatchVariables": true
19+
"noUncheckedSideEffectImports": true
2320
},
2421
"include": ["*"]
2522
}

0 commit comments

Comments
 (0)