{"id":15566984,"url":"https://github.com/softbearstudios/bitcode","last_synced_at":"2025-04-13T08:59:57.640Z","repository":{"id":153206652,"uuid":"628456323","full_name":"SoftbearStudios/bitcode","owner":"SoftbearStudios","description":"A binary encoder/decoder for Rust","archived":false,"fork":false,"pushed_at":"2024-09-24T18:42:00.000Z","size":334,"stargazers_count":364,"open_issues_count":21,"forks_count":19,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-10-29T15:48:54.792Z","etag":null,"topics":["rust","rust-lang","serde","serialization"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/bitcode/","language":"Rust","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/SoftbearStudios.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","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":"2023-04-16T02:04:20.000Z","updated_at":"2024-10-29T05:25:35.000Z","dependencies_parsed_at":"2023-07-08T06:00:18.571Z","dependency_job_id":"3713a887-3c2f-4094-a9d7-bddf7a297b40","html_url":"https://github.com/SoftbearStudios/bitcode","commit_stats":{"total_commits":118,"total_committers":6,"mean_commits":"19.666666666666668","dds":0.5169491525423728,"last_synced_commit":"83dc478963bcff864e6d8385d2987fa9f93a9e29"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftbearStudios%2Fbitcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftbearStudios%2Fbitcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftbearStudios%2Fbitcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftbearStudios%2Fbitcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SoftbearStudios","download_url":"https://codeload.github.com/SoftbearStudios/bitcode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688556,"owners_count":21145765,"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","rust-lang","serde","serialization"],"created_at":"2024-10-02T17:09:26.483Z","updated_at":"2025-04-13T08:59:57.613Z","avatar_url":"https://github.com/SoftbearStudios.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bitcode\n[![Documentation](https://docs.rs/bitcode/badge.svg)](https://docs.rs/bitcode)\n[![crates.io](https://img.shields.io/crates/v/bitcode.svg)](https://crates.io/crates/bitcode)\n[![Build](https://github.com/SoftbearStudios/bitcode/actions/workflows/build.yml/badge.svg)](https://github.com/SoftbearStudios/bitcode/actions/workflows/build.yml)\n\nA binary encoder/decoder with the following goals:\n- 🔥 Blazingly fast\n- 🐁 Tiny serialized size\n- 💎 Highly compressible by Deflate/LZ4/Zstd\n\nIn contrast, these are non-goals:\n- Stable format across major versions\n- Self describing format\n- Compatibility with languages other than Rust\n\nSee [rust_serialization_benchmark](https://github.com/djkoloski/rust_serialization_benchmark) for benchmarks.\n\n## Example\n```rust\nuse bitcode::{Encode, Decode};\n\n#[derive(Encode, Decode, PartialEq, Debug)]\nstruct Foo\u003c'a\u003e {\n    x: u32,\n    y: \u0026'a str,\n}\n\nlet original = Foo {\n    x: 10,\n    y: \"abc\",\n};\n\nlet encoded: Vec\u003cu8\u003e = bitcode::encode(\u0026original); // No error\nlet decoded: Foo\u003c'_\u003e = bitcode::decode(\u0026encoded).unwrap();\nassert_eq!(original, decoded);\n```\n\n## Adding Support for Libraries\n\nSee the instructions [here](https://github.com/SoftbearStudios/bitcode/wiki/Adding-library-support)!\n\n## Implementation Details\n- Heavily inspired by \u003chttps://github.com/That3Percent/tree-buf\u003e\n- All instances of each field are grouped together making compression easier\n- Uses smaller integers where possible all the way down to 1 bit\n- Validation is performed up front on typed vectors before deserialization\n- Code is designed to be auto-vectorized by LLVM\n\n## `serde`\nA `serde` integration is gated behind the `\"serde\"` feature flag. Click [here](https://github.com/SoftbearStudios/bitcode/wiki/Serde) to learn more.\n\n## `#![no_std]`\nAll `std`-only functionality is gated behind the (default) `\"std\"` feature.\n\n`alloc` is required.\n\n## License\nLicensed under either of\n* Apache License, Version 2.0\n  ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n* MIT license\n  ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n## Contribution\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftbearstudios%2Fbitcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftbearstudios%2Fbitcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftbearstudios%2Fbitcode/lists"}