{"id":16888861,"url":"https://github.com/nyurik/delta-encoding","last_synced_at":"2025-06-22T06:34:50.892Z","repository":{"id":41313383,"uuid":"508872395","full_name":"nyurik/delta-encoding","owner":"nyurik","description":"A Rust library to encode and decode a delta-encoded stream of numbers","archived":false,"fork":false,"pushed_at":"2025-06-11T18:02:46.000Z","size":69,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-18T23:17:08.321Z","etag":null,"topics":["decoding-library","delta-encoding","encoding-library","rust-library"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nyurik.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.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,"zenodo":null}},"created_at":"2022-06-29T23:19:59.000Z","updated_at":"2025-06-11T17:59:11.000Z","dependencies_parsed_at":"2025-04-11T12:56:27.927Z","dependency_job_id":"9d6daf64-6dda-40fa-8087-6e59e97b9c86","html_url":"https://github.com/nyurik/delta-encoding","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/nyurik/delta-encoding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyurik%2Fdelta-encoding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyurik%2Fdelta-encoding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyurik%2Fdelta-encoding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyurik%2Fdelta-encoding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nyurik","download_url":"https://codeload.github.com/nyurik/delta-encoding/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyurik%2Fdelta-encoding/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261249065,"owners_count":23130489,"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":["decoding-library","delta-encoding","encoding-library","rust-library"],"created_at":"2024-10-13T16:54:31.528Z","updated_at":"2025-06-22T06:34:45.874Z","avatar_url":"https://github.com/nyurik.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Delta-Encoding library\n\n[![GitHub](https://img.shields.io/badge/github-nyurik/delta--encoding-8da0cb?logo=github)](https://github.com/nyurik/delta-encoding)\n[![crates.io version](https://img.shields.io/crates/v/delta-encoding)](https://crates.io/crates/delta-encoding)\n[![docs.rs](https://img.shields.io/docsrs/delta-encoding)](https://docs.rs/delta-encoding)\n[![crates.io license](https://img.shields.io/crates/l/delta-encoding)](https://github.com/nyurik/delta-encoding/blob/main/LICENSE-APACHE)\n[![CI build](https://github.com/nyurik/delta-encoding/actions/workflows/ci.yml/badge.svg)](https://github.com/nyurik/delta-encoding/actions)\n[![Codecov](https://img.shields.io/codecov/c/github/nyurik/delta-encoding)](https://app.codecov.io/gh/nyurik/delta-encoding)\n\n\nA simple library for encoding and decoding a stream of values as delta-encoded.  For example, if you have a stream of values like this:\n\n```text\n1, 3, 2, 4, 5\n```\n\nthe delta-encoded stream would be:\n\n```text\n1, 2, -1, 2, 1\n```\n\n## Usage\n\n```rust\nuse delta_encoding::{DeltaEncoderExt, DeltaDecoderExt};\n\npub fn main() {\n  let data = vec![1, 2, 5, 4, 2];\n\n  // Delta-encode without consuming, and without making a vector copy\n  let encoded: Vec\u003ci64\u003e = data.iter().copied().deltas().collect();\n  assert_eq!(encoded, vec![1, 1, 3, -1, -2]);\n\n  // Consume and delta-encode\n  let encoded: Vec\u003ci64\u003e = data.into_iter().deltas().collect();\n  assert_eq!(encoded, vec![1, 1, 3, -1, -2]);\n\n  let data = vec![1, 1, 3, -1, -2];\n\n  // Delta-decode without consuming, and without making a vector copy\n  let decoded: Vec\u003ci64\u003e = data.iter().copied().original().collect();\n  assert_eq!(decoded, vec![1, 2, 5, 4, 2]);\n\n  // Consume and delta-decode\n  let decoded: Vec\u003ci64\u003e = data.into_iter().original().collect();\n  assert_eq!(decoded, vec![1, 2, 5, 4, 2]);\n}\n```\n\n## Development\n\n* This project is easier to develop with [just](https://github.com/casey/just#readme), a modern alternative to `make`.\n  Install it with `cargo install just`.\n* To get a list of available commands, run `just`.\n* To run tests, use `just test`.\n\n## License\n\nLicensed under either of\n\n* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n  at your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the\nApache-2.0 license, shall be dual licensed as above, without any\nadditional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyurik%2Fdelta-encoding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnyurik%2Fdelta-encoding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyurik%2Fdelta-encoding/lists"}