Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

功能建议:使用 xxhash 生成更短的文件标识符 #144

Open
mark9804 opened this issue Nov 10, 2024 · 0 comments
Open

功能建议:使用 xxhash 生成更短的文件标识符 #144

mark9804 opened this issue Nov 10, 2024 · 0 comments

Comments

@mark9804
Copy link

mark9804 commented Nov 10, 2024

看到了作者在 Extension store 的回复,似乎在寻找一种更短的唯一文件标识符

image

之前我用过一个 xxhash 库,作者可以尝试把图片的 base64 编码作为输入

import xxhash from "xxhashjs";

function calcHash(text: string): string {
  return xxhash.h32(text, 0).toString(16);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant