{"id":18280034,"url":"https://github.com/lepips/blurhashkit","last_synced_at":"2026-05-09T09:27:22.302Z","repository":{"id":54477924,"uuid":"522392634","full_name":"LePips/BlurHashKit","owner":"LePips","description":"Swift Package for BlurHash","archived":false,"fork":false,"pushed_at":"2023-12-28T21:19:05.000Z","size":21,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T19:55:21.093Z","etag":null,"topics":["blurhash","ios","macos","spm","swift","swiftpackage","swiftui","tvos"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LePips.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-08T03:30:06.000Z","updated_at":"2025-02-21T18:58:13.000Z","dependencies_parsed_at":"2024-11-05T12:32:40.438Z","dependency_job_id":"5080b725-ca0e-46b6-a7d7-fc976f9f7442","html_url":"https://github.com/LePips/BlurHashKit","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LePips%2FBlurHashKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LePips%2FBlurHashKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LePips%2FBlurHashKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LePips%2FBlurHashKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LePips","download_url":"https://codeload.github.com/LePips/BlurHashKit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294443,"owners_count":20915335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blurhash","ios","macos","spm","swift","swiftpackage","swiftui","tvos"],"created_at":"2024-11-05T12:32:22.604Z","updated_at":"2026-05-09T09:27:22.293Z","avatar_url":"https://github.com/LePips.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BlurHashKit\n\nInitially a port of the [BlurHash's Swift](https://github.com/woltapp/blurhash/tree/master/Swift/BlurHashKit) but rewritten with some optimizations. ~10% faster `String -\u003e [UI|NS]Image` decoding.\n\nSupports iOS, tvOS, watchOS, and macOS.\n\n\u003cdetails\u003e\n\u003csummary\u003eOn Optimizations\u003c/summary\u003e\n\nThis package tries to cache repeatedly used values as much as possible. Due to this, there may be an additional memory footprint. However, it's assumed your app has heavy use of BlurHashes, so this should be negligible.\n\nThis package makes optimizations for `(4, 3)` component shape. Using another shape may lose these optimizations, but you probably don't need to use anything else anyways.\n\nOptimization implementations were validated with pixel comparison against the initial port.\n\u003c/details\u003e\n\n## Usage\n\nDecode a blurhash string directly into an image or encode an image into a BlurHash string:\n\n```swift\n\n// AppKit/UIKit\n\nlet image = UIImage(blurHash: \"LGF5?xYk^6#M@-5c,1J5@[or[Q6.\")\nlet image = NSImage(blurHash: \"LGF5?xYk^6#M@-5c,1J5@[or[Q6.\")\n\nlet blurHashString = image?.cgImage?.blurHash()\n\n// SwiftUI\n\nlet image = Image(blurHash: \"LGF5?xYk^6#M@-5c,1J5@[or[Q6.\")\n```\n\nSee `Examples/BlurHashExample` to see how to use BlurHash.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flepips%2Fblurhashkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flepips%2Fblurhashkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flepips%2Fblurhashkit/lists"}