{"id":18877973,"url":"https://github.com/4as/haxe-deflatex","last_synced_at":"2026-01-27T03:02:54.732Z","repository":{"id":87797365,"uuid":"527183761","full_name":"4as/haxe-deflatex","owner":"4as","description":"Implementation of the deflate and inflate functions in pure Haxe.","archived":false,"fork":false,"pushed_at":"2023-03-09T14:45:12.000Z","size":20,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-31T04:44:41.931Z","etag":null,"topics":["compression","cross-platform","decompression","deflate","haxe","haxelib","inflate"],"latest_commit_sha":null,"homepage":"","language":"Haxe","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/4as.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-08-21T11:17:07.000Z","updated_at":"2023-03-09T08:27:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"8897db87-cb1f-4c8a-a516-c134fd629616","html_url":"https://github.com/4as/haxe-deflatex","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/4as/haxe-deflatex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4as%2Fhaxe-deflatex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4as%2Fhaxe-deflatex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4as%2Fhaxe-deflatex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4as%2Fhaxe-deflatex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4as","download_url":"https://codeload.github.com/4as/haxe-deflatex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4as%2Fhaxe-deflatex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28798626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T01:07:07.743Z","status":"online","status_checked_at":"2026-01-27T02:00:07.755Z","response_time":168,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","cross-platform","decompression","deflate","haxe","haxelib","inflate"],"created_at":"2024-11-08T06:23:02.458Z","updated_at":"2026-01-27T03:02:54.714Z","avatar_url":"https://github.com/4as.png","language":"Haxe","funding_links":[],"categories":[],"sub_categories":[],"readme":"DeflateX is a Haxe port of the deflate/inflate implementation written by [RidgeX](https://github.com/RidgeX/deflate-impl) (hence the \"X\" in the name). Written purely in Haxe without any additional dependencies, it compiles to all available targets, but was tested only for JS, Flash, C++ (Windows), C# (Windows), PHP, Java, and HashLink.  \n  \n# Usage  \nDeflateX provides not only the standard *deflate* and *inflate* algorithms, but also is able to compress and decompress gzip files.  \nUsing DeflateX is pretty straightforward. If you want to compress a byte array simply pass it into the static `Deflater.apply` method.  \n`var test:String = \"Test data 123\";`  \n`var test_bytes:Bytes = Bytes.ofString(test);`  \n`var compressed:Bytes = Deflater.apply(test_bytes);`  \nHowever, in case you're working in a multi-threaded environment and want to run multiple deflate operations in parallel, you can also instantiate an unique `Deflater` object and call `compress` method instead:  \n`var deflater:Deflater = new Deflater();`  \n`var compressed:Bytes = deflater.compress(test_bytes);`  \n  \nOnce a byte array is deflated you can proceed to decompress it using the static `Inflater.apply` method:  \n`var decompressed:Bytes = Inflater.apply(compressed);`  \n`var result:String = decompressed.getString(0, decompressed.length);`  \n`trace(result); //following the Usage steps this should output \"Test data 123\"`  \nOr alternatively, as with `Deflater`, by instating the `Inflater` object and calling the `decompress` method:  \n`var inflater:Inflater = new Inflater();`  \n`var decompressed:Bytes = inflater.decompress(compressed);`  \n  \nAs for gzip files, those can be compressed and decompress using the static `compress` and `decompress` methods available in the `GZCompressor` class. Both are multi-thread safe.  \n  \n# Installation  \nDeflateX can be installed by simply downloading the zipped source code from the Releases sub-page and extracting it into your project, or by using *haxelib*:  \n1. Install by executing command: `haxelib install deflatex`.  \n2. Add to your project by including `-lib deflatex` in your *hxml* file. Or `\u003chaxelib name=\"deflatex\" /\u003e` if you're using OpenFL's `project.xml`.  \n\nOnce installed `Deflater` and `Inflater` classes should become available by importing the `deflatex` package.\n\n# Disclaimer  \nDeflateX was tested by sending the deflated data to PHP's native [inflate method](https://www.php.net/manual/en/function.gzinflate.php) and verifying the correctness of the uncompressed data. However the algorithms were ported without any deeper considerations of the inner workings. If something doesn't match the official DEFLATE specification I probably won't be able to help with that.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4as%2Fhaxe-deflatex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4as%2Fhaxe-deflatex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4as%2Fhaxe-deflatex/lists"}