{"id":19141224,"url":"https://github.com/arzyu/compressed-sparse-row","last_synced_at":"2026-07-11T08:31:17.809Z","repository":{"id":128922861,"uuid":"106945487","full_name":"arzyu/compressed-sparse-row","owner":"arzyu","description":null,"archived":false,"fork":false,"pushed_at":"2017-10-15T16:13:39.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T05:38:02.151Z","etag":null,"topics":["algorithm"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arzyu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-10-14T16:50:31.000Z","updated_at":"2019-01-08T13:18:02.000Z","dependencies_parsed_at":"2023-04-23T02:31:37.632Z","dependency_job_id":null,"html_url":"https://github.com/arzyu/compressed-sparse-row","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arzyu/compressed-sparse-row","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arzyu%2Fcompressed-sparse-row","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arzyu%2Fcompressed-sparse-row/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arzyu%2Fcompressed-sparse-row/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arzyu%2Fcompressed-sparse-row/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arzyu","download_url":"https://codeload.github.com/arzyu/compressed-sparse-row/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arzyu%2Fcompressed-sparse-row/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35356473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["algorithm"],"created_at":"2024-11-09T07:22:04.083Z","updated_at":"2026-07-11T08:31:17.792Z","avatar_url":"https://github.com/arzyu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compressed Sparse Row\n\n## Installation\n\n```bash\nyarn add compressed-sparse-row\n```\n\n## Usage\n\n```javascript\nimport csr from \"compressed-sparse-row\";\n\nconst matrix = [\n  [1, 7, 0, 0],\n  [0, 2, 8, 0],\n  [5, 0, 3, 9],\n  [0, 6, 0, 4]\n];\n\nconst compressed = csr.compress(matrix);\n\nconsole.log(JSON.stringify(compressed));\n// [[4,4],[0,2,4,7,9],[0,1,1,2,0,2,3,1,3],[1,7,2,8,5,3,9,6,4]]\n// [shape, rowOffsets, columnIndices, values]\n\nconst originMatrix = csr.decompress(compressed);\n\nconsole.log(JSON.stringify(originMatrix));\n// [[1,7,0,0],[0,2,8,0],[5,0,3,9],[0,6,0,4]]\n\n```\n\n## Reference\n\n[Sparse Matrix Storage Formats](http://www.bu.edu/pasi/files/2011/01/NathanBell1-10-1000.pdf) [page 11]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farzyu%2Fcompressed-sparse-row","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farzyu%2Fcompressed-sparse-row","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farzyu%2Fcompressed-sparse-row/lists"}