api_windows_x64.go 418 B

123456789101112131415161718192021
  1. //go:build windows && (amd64 || arm64 || ppc64 || ppc64le || s390x || mips64 || mips64le)
  2. package yu_deflate
  3. import (
  4. _ "embed"
  5. yu_file "gogs.qqck.cn/s/tools/file"
  6. "os"
  7. )
  8. // dll下载地址:https://github.com/ebiggers/libdeflate
  9. // Releases v1.19
  10. //go:embed api_windows_x64.dll
  11. var dll_raw []byte
  12. func init() {
  13. j_path := os.TempDir() + "libdeflatex64.dll"
  14. yu_file.Write(j_path, dll_raw)
  15. loadDLL(j_path)
  16. }