{"id":13726774,"url":"https://github.com/adumbidiot/lz-str-rs","last_synced_at":"2025-12-12T15:19:49.112Z","repository":{"id":49592251,"uuid":"179898657","full_name":"adumbidiot/lz-str-rs","owner":"adumbidiot","description":"A port of lz-string to Rust","archived":false,"fork":false,"pushed_at":"2024-09-16T09:05:28.000Z","size":1533,"stargazers_count":28,"open_issues_count":5,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T02:55:08.123Z","etag":null,"topics":["lz-str-rs","lz-string","lz-string-rs","lzstring","rust"],"latest_commit_sha":null,"homepage":"https://adumbidiot.github.io/lz-str-rs/lz_str/","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/adumbidiot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE.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":"2019-04-06T23:44:04.000Z","updated_at":"2025-01-16T10:44:41.000Z","dependencies_parsed_at":"2023-02-10T14:01:02.518Z","dependency_job_id":"1accd0b7-e182-41ab-a51a-03eba99205d7","html_url":"https://github.com/adumbidiot/lz-str-rs","commit_stats":{"total_commits":42,"total_committers":4,"mean_commits":10.5,"dds":"0.30952380952380953","last_synced_commit":"2331d81c914aaedf457066bebb1b75f31e191b1b"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adumbidiot%2Flz-str-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adumbidiot%2Flz-str-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adumbidiot%2Flz-str-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adumbidiot%2Flz-str-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adumbidiot","download_url":"https://codeload.github.com/adumbidiot/lz-str-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252965074,"owners_count":21832817,"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":["lz-str-rs","lz-string","lz-string-rs","lzstring","rust"],"created_at":"2024-08-03T01:03:21.182Z","updated_at":"2025-12-12T15:19:49.079Z","avatar_url":"https://github.com/adumbidiot.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# lz-str-rs\n[![crates.io](https://img.shields.io/crates/v/lz-str.svg)](https://crates.io/crates/lz-str)\n[![Documentation](https://docs.rs/lz-str/badge.svg)](https://docs.rs/lz-str)\n[![MIT/Apache-2 licensed](https://img.shields.io/crates/l/lz-str.svg)](./LICENSE-APACHE)\n![Rust](https://github.com/adumbidiot/lz-str-rs/workflows/Rust/badge.svg)\n\nA port of [lz-string](https://github.com/pieroxy/lz-string) to Rust. \n\n### Installing\n\nAdd the following to your `Cargo.toml` file:\n\n```toml\n[dependencies]\nlz-str = \"0.2.1\"\n```\n\n## Getting Started\n\n```rust\n// The demonstrated functions correspond with `LZString.compress` and `LZString.decompress` from the JS version.\nfn main() {\n    let data = \"The quick brown fox jumps over the lazy dog\";\n\n    // Compress the data. This cannot fail.\n    let compressed_data = lz_str::compress(data);\n\n    // Decompress the data.\n    // This may return `Option::None` if it fails.\n    // Make sure to do error-checking in a real application to prevent crashes!\n    let decompressed_data =\n        lz_str::decompress(compressed_data).expect(\"`compressed_data` is invalid\");\n\n    // The decompressed_data should be the same as data, except encoded as UTF16.\n    // We undo that here.\n    // In a real application,\n    // you will want to do error checking to prevent users from causing crashes with invalid data.\n    let decompressed_data =\n        String::from_utf16(\u0026decompressed_data).expect(\"`decompressed_data` is not valid UTF16\");\n\n    assert!(data == decompressed_data);\n}\n```\n\nSee the [examples](https://github.com/adumbidiot/lz-str-rs/tree/master/examples) directory for more examples.\n\n## Features\n`rustc-hash`: This feature will replace some internal maps' hashers with rustc-hash, \nboosting performance at the cost of not using a DOS-resistant hasher.\n\n## Testing\n```bash\ncargo test\n```\n\n## Benching\n```bash\ncargo bench\n```\n\n## Bindings\n* [WebAssembly](bindings/lz-str-wasm)\n* [Python](bindings/lz-str-py)\n\n## Authors\nadumbidiot (Nathaniel Daniel)\n\n## License\nLicensed under either of\n * Apache License, Version 2.0\n   ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license\n   ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Contributing\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%2Fadumbidiot%2Flz-str-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadumbidiot%2Flz-str-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadumbidiot%2Flz-str-rs/lists"}