{"id":21647862,"url":"https://github.com/markknol/hx-lzstring","last_synced_at":"2025-03-20T01:54:34.886Z","repository":{"id":69819693,"uuid":"180744004","full_name":"markknol/hx-lzstring","owner":"markknol","description":"LZString port in Haxe","archived":false,"fork":false,"pushed_at":"2019-07-16T07:42:22.000Z","size":18,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-25T05:11:30.670Z","etag":null,"topics":["compression","compression-algorithm","encryption","encryption-algorithm","haxe"],"latest_commit_sha":null,"homepage":null,"language":"Haxe","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/markknol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"patreon":"markknol","custom":["http://paypal.me/markknol"]}},"created_at":"2019-04-11T08:02:36.000Z","updated_at":"2022-08-25T00:01:25.000Z","dependencies_parsed_at":"2023-02-25T18:00:36.215Z","dependency_job_id":null,"html_url":"https://github.com/markknol/hx-lzstring","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markknol%2Fhx-lzstring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markknol%2Fhx-lzstring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markknol%2Fhx-lzstring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markknol%2Fhx-lzstring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markknol","download_url":"https://codeload.github.com/markknol/hx-lzstring/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244536441,"owners_count":20468349,"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":["compression","compression-algorithm","encryption","encryption-algorithm","haxe"],"created_at":"2024-11-25T06:52:01.344Z","updated_at":"2025-03-20T01:54:34.866Z","avatar_url":"https://github.com/markknol.png","language":"Haxe","funding_links":["https://patreon.com/markknol","http://paypal.me/markknol"],"categories":[],"sub_categories":[],"readme":"# LZString\n[![Build Status](https://travis-ci.org/markknol/hx-lzstring.svg?branch=master)](https://travis-ci.org/markknol/hx-lzstring) [![Haxelib Version](https://img.shields.io/github/tag/markknol/hx-lzstring.svg?label=haxelib)](http://lib.haxe.org/p/lzstring)\n \n**LZ-based compression algorithm for Haxe.**\n\nThis is a port of lz-string \u003chttps://github.com/pieroxy/lz-string\u003e. More info about the library can be found here http://pieroxy.net/blog/pages/lz-string/index.html.\n\nThis library should run on all Haxe targets. (but is mostly tested in JavaScript and Macro context).\n\n### Dependencies\n\n * [Haxe](https://haxe.org/) 4.0+\n\n### Install the library for your project\n\nInstall the library using haxelib\n\n```\nhaxelib install lzstring\n```\n\nAnd add this to your compile arguments / build hxml file\n\n```\n-lib lzstring\n```\n\n### Using the library\n\nImport the library in your code.\n\n```haxe\nimport lzstring.LZString;\n```\n\n#### API\n\n```haxe\ncompress(uncompressed:String):String\ncompressToBase64(input:String):String\ncompressToEncodedURIComponent(input:String):String\ncompressToUint8Array(uncompressed:String):UInt8Array\ncompressToUTF116(input:String):String\n\ndecompress(compressed:String):String\ndecompressFromBase64(input:String):String\ndecompressFromEncodedURIComponent(input:String):String\ndecompressFromUint8Array(compressed:UInt8Array):String\ndecompressFromUTF116(compressed:String):String\n```\n\n#### Usage\n```haxe\nvar input = \"aaaaabaaaaacaaaaadaaaaaeaaaaaaa\";\nvar l = new LZString();\n\nvar compressed = l.compress(input);\ntrace(compressed);  // â†‰à£”ä†ã „í˜…ã–ˆè€€\n\nvar decompressed = l.decompress(compressed);\ntrace(decompressed); // aaaaabaaaaacaaaaadaaaaaeaaaaaaa\n\ntrace(input == decompressed); // true\n```\n\n#### Base64 \n\n```haxe\nvar input = \"aaaaabaaaaacaaaaadaaaaaeaaaaaaa\";\nvar l = new LZString();\nvar compressed = l.compressToBase64(input);\ntrace(compressed); // IYkI1EGNOATWBTWIg===\n\nvar decompressed = l.decompressFromBase64(compressed);\ntrace(decompressed); // aaaaabaaaaacaaaaadaaaaaeaaaaaaa\n\ntrace(input == decompressed); // true\n```\n\n### Run test\n\nClone the repository and run \n```\nhaxe test.hxml\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkknol%2Fhx-lzstring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkknol%2Fhx-lzstring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkknol%2Fhx-lzstring/lists"}