{"id":18498336,"url":"https://github.com/softdevteam/packedvec","last_synced_at":"2025-04-09T00:31:13.714Z","repository":{"id":48236723,"uuid":"105667213","full_name":"softdevteam/packedvec","owner":"softdevteam","description":"Store vectors of integers efficiently","archived":false,"fork":false,"pushed_at":"2025-03-17T17:49:35.000Z","size":93,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-17T18:04:31.243Z","etag":null,"topics":["rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softdevteam.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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-03T15:17:33.000Z","updated_at":"2025-03-17T17:41:12.000Z","dependencies_parsed_at":"2024-11-06T18:16:21.399Z","dependency_job_id":null,"html_url":"https://github.com/softdevteam/packedvec","commit_stats":{"total_commits":46,"total_committers":4,"mean_commits":11.5,"dds":"0.23913043478260865","last_synced_commit":"3dd3fced1795736f8febe0ac5a5ee729b3ae324e"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softdevteam%2Fpackedvec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softdevteam%2Fpackedvec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softdevteam%2Fpackedvec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softdevteam%2Fpackedvec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softdevteam","download_url":"https://codeload.github.com/softdevteam/packedvec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247949831,"owners_count":21023398,"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":["rust"],"created_at":"2024-11-06T13:38:48.324Z","updated_at":"2025-04-09T00:31:08.702Z","avatar_url":"https://github.com/softdevteam.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://api.travis-ci.org/softdevteam/packedvec.svg?branch=master)](https://travis-ci.org/softdevteam/packedvec)\n[![Latest version](https://img.shields.io/crates/v/packedvec.svg)](https://crates.io/crates/packedvec)\n[![Documentation](https://docs.rs/packedvec/badge.svg)](https://docs.rs/packedvec)\n\n# PackedVec\n\nA [`PackedVec`](https://docs.rs/packedvec/) stores vectors of integers\nefficiently while providing an API similar to `Vec`. The basic idea is to store\neach element using the minimum number of bits needed to represent every element\nin the `Vec`. For example, if we have a `Vec\u003cu64\u003e` with elements [20, 30, 140],\nevery element wastes most of its 64 bits: 7 bits is sufficient to represent the\nrange of elements in the vector. Given this input vector, `PackedVec` stores\neach elements using exactly 7 bits, saving substantial memory. For vectors which\noften contain small ranges of numbers, and which are created rarely, but read\nfrom frequently, this can be a significant memory and performance win.\n\n# Examples\n\n`PackedVec` has two main API differences from `Vec`: a `PackedVec` is created\nfrom a `Vec`; and a `PackedVec` returns values rather than references. Both\npoints can be seen in this example:\n\n```rust\nuse packedvec::PackedVec;\nlet v = vec![-1, 30, 120];\nlet pv = PackedVec::new(v.clone());\nassert_eq!(pv.get(0), Some(-1));\nassert_eq!(pv.get(2), Some(120));\nassert_eq!(pv.get(3), None);\nassert_eq!(v.iter().cloned().collect::\u003cVec\u003c_\u003e\u003e(), pv.iter().collect::\u003cVec\u003c_\u003e\u003e());\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftdevteam%2Fpackedvec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftdevteam%2Fpackedvec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftdevteam%2Fpackedvec/lists"}