Brooooooklyn / snappy

Fastest Snappy compression library in Node.js
MIT License
165 stars 9 forks source link

Use Sanppy in the electron environment #187

Open imxiny opened 5 months ago

imxiny commented 5 months ago

How Do I use Snappy in an electron environment? There is an Error when I call snappyCompressSync after the installation, but there is no specific Error, only an Error. Can you help me? Thank you

Brooooooklyn commented 5 months ago

There is an Error when I call snappyCompressSync after the installation

What error?

imxiny commented 5 months ago

It's just empty Error , only call stack information, without any specific error reporting. The current solution is to replace the library @stablelib/snappy which is a pure js implementation.

lz4 This compression algorithm library also does not work, this has a specific error Error: Module did not self-register: '\\? \D:\Projects\utools\utools-ipx-v4\node_modules\lz4\build\Release\xxhash.node'.

Using npm rebuild lz4 --runtime=electron --target=22.3.27 --dist-url=https://atom.io/download/electron didn't fix it either!