{"id":25115444,"url":"https://github.com/orbitturner/orbit-encoder","last_synced_at":"2025-04-22T14:22:14.582Z","repository":{"id":56718562,"uuid":"480787008","full_name":"orbitturner/ORBIT-ENCODER","owner":"orbitturner","description":"A versatile library that efficiently encodes and compresses diverse data inputs into concise strings.","archived":false,"fork":false,"pushed_at":"2023-11-23T17:39:29.000Z","size":1522,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T14:22:08.299Z","etag":null,"topics":["compression","encoder-decoder"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/orbit-encoder","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orbitturner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-04-12T11:47:08.000Z","updated_at":"2024-01-09T01:27:46.000Z","dependencies_parsed_at":"2023-11-23T18:42:25.812Z","dependency_job_id":null,"html_url":"https://github.com/orbitturner/ORBIT-ENCODER","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"18388548479f9dcfed1d5febe5848905497109d9"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitturner%2FORBIT-ENCODER","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitturner%2FORBIT-ENCODER/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitturner%2FORBIT-ENCODER/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitturner%2FORBIT-ENCODER/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orbitturner","download_url":"https://codeload.github.com/orbitturner/ORBIT-ENCODER/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250255923,"owners_count":21400436,"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","encoder-decoder"],"created_at":"2025-02-08T02:28:43.891Z","updated_at":"2025-04-22T14:22:14.562Z","avatar_url":"https://github.com/orbitturner.png","language":"TypeScript","readme":"# 🟢 ORBIT ENCODER ⚙️🗜️\n[![Compatible Status](https://img.shields.io/badge/works%20with-PS1-blue)](https://github.com/orbitturner/ORBIT-ENCODER)\n[![Code Size Status](https://img.shields.io/github/languages/code-size/orbitturner/ORBIT-ENCODER)](https://github.com/orbitturner/ORBIT-ENCODER)\n[![Commit Status](https://img.shields.io/github/commit-activity/m/orbitturner/ORBIT-ENCODER?color=red)](https://github.com/orbitturner/ORBIT-ENCODER)\n[![Issues Status](https://img.shields.io/github/issues/orbitturner/ORBIT-ENCODER)](https://github.com/orbitturner/ORBIT-ENCODER)\n[![npm version](https://img.shields.io/npm/v/ORBIT-ENCODER.svg)](https://github.com/orbitturner/ORBIT-ENCODER) [![license](https://img.shields.io/npm/l/ORBIT-ENCODER.svg)](https://github.com/orbitturner/ORBIT-ENCODER)\n\n**ORBIT-ENCODER** is an utility library for Data Compression and Encoding. It can take whatever object you give him as argument and returns a compressed encoded string. It provides a decoding method too. It uses a modified version of [*LZString*](https://www.npmjs.com/package/lz-string) for UTF16 Compression.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://orbitturner.com/\"\u003e\u003cimg src=\"./.repo-assets/images/GITHUB REPOS COVER.gif\" width=\"auto\" alt=\"ORBIT-ENCODER COVER\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n\u003ch1 align=\"center\"\u003eINSTALLATION\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/orbitturner/ORBIT-ENCODER\"\u003e\u003cimg src=\"https://img.shields.io/badge/DOWNLOAD-LATEST%20VERSION-lime?style=for-the-badge\u0026logo=docusign\u0026logoColor=lime\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/orbitturner/ORBIT-ENCODER/issues/new/choose\"\u003e\u003cimg src=\"https://img.shields.io/badge/ISSUES-CREATE%20AN%20ISSUE-crimson?style=for-the-badge\u0026logo=indeed\u0026logoColor=CRIMSON\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\n___\n## 📚 Table Of Contents 📑\n- [🟢 ORBIT ENCODER ⚙️🗜️](#orbit-encoder)\n  * [📚 Table Of Contents 📑](#table-of-contents)\n  * [💨 What is this Library for? 🤔](#what-is-this-library-for)\n  * [✨ Key Features 🎯](#key-features---)\n  * [📥 HOW TO RUN IT ? 🔰](#how-to-run-it)\n  * [🤔 HOW IT WORKS ? 🤔](#how-it-works)\n    + [➤ Encode \u0026 Decode Given Data 🟢](#encode---decode-given-data)\n  * [Configuration Options](#configuration-options)\n  * [Contributing ❤](#contributing--)\n  * [Issue Reporting](#issue-reporting)\n  * [GREETINGS](#greetings)\n  * [Author](#author)\n  * [License](#license)\n\n___\n\n## 💨 What is this Library for? 🤔\n\n**ORBIT-ENCODER** is a small library that is useful for Encoding Objects [`String, Arrays, JSON, Anything...`] to a `Compressed UTF16` String. You can also Decode that string back using The exposed **Decode**  method.\n\n\n\u003e **Note:** This library can only be used with JS or TS but you already know that 🤦🏿‍♂️.\n\n\n\n## ✨ Key Features 🎯\n\n* Use it **without `instantiation`**  because all the methods are `Static`.\n* **Fast and High Performance Compression** of big Complex Data.\n* ✅ TOO EASY TO USE !! 🥳🥳\n\n___\n\n## 📥 HOW TO RUN IT ? 🔰\n\n```bash\n# installation with npm\nnpm install array-querier\n\n# or you may prefer\nnpm i --save array-querier\n\n# installation with yarn\nyarn add array-querier\n```\n\n**This SCRIPT relies on NOTHING SO YOU DON'T NEED ADDITIONNAL PACKAGES.**\n\n___\n## 🤔 HOW IT WORKS ? 🤔\n\nYou only need to Import the ***OrbitEncoder*** Class from the Package and start using it !\n\n### ➤ Encode \u0026 Decode Given Data 🟢\nIf you have a User object as follows -\u003e\n```json\nconst User = {\n    \"name\": \"Orbit\",\n    \"age\": 21,\n    \"planet\": {\n        \"id\": 4,\n        \"codename\" : \"Shadow-Coders\",\n        \"galaxyName\" : \"Turner\"\n    }   \n}\n```\n👇🏾 Let's Encode and Decode an Objects :\n\n- **ECMAScript Modules and Typescript** \n```typescript\n    import {OrbitEncoder} from 'orbit-encoder/lib/OrbitEncoder';\n\n    // Then Encode whatever you want\n    const encodedData = OrbitEncoder.encode(User);\n\n    console.log(encodedData);\n    /**\n     * 👇🏾 Output: 👇🏾\n     * \n     * ᓢ㰴䅼ী甤〦恩Ìߐዠᔣᣡ䂦TɈ〦⁐䰠ᘡ㐢〪僠㲪␠祶fĂ࢕⓸Ǹ͚ࣣគⵉM䀼䀻什䁕㒘攈ᢸ᣷吰ৣ乩厖亰æၩ䩴¸椮ࠢ昤怪挑䃒塐恬睂⑘䤣\u0026㉀PƘ䀠\n     * \n     * /\n```\n```typescript\n    ...\n    const decodedData = OrbitEncoder.decode(encodedData);\n\n    console.log(decodedData);\n    /**\n     * 👇🏾 Output: 👇🏾\n     * \n     * {\n        name: 'Orbit',\n        age: 21,\n        planet: { id: 4, codename: 'Shadow-Coders', galaxyName: 'Turner' }\n      }\n     * \n     * /\n```\n**🛑 ANGULAR \u0026 FRONTEND USERS ☢️**\n\u003e **Note:** If you are using this in your frontend application you'll need to add the folowing line in your `index.html` 👇🏾:.\n```html\n    \u003cscript\u003e if (global === undefined) { var global = window; } \u003c/script\u003e\n```\n\u003e **FIX COMING:** We are working on Future updates that will try to fix this error [*Uncaught ReferenceError: global is not defined*].\n\n\n\n- **CommonJs and Vanilla JS** \n```javascript\n  const orbit = require(\"orbit-encoder\").OrbitEncoder;\n\n  const data = orbit.encode('Bodio Bodio Yei !!');\n\n  console.log(data); // 🚀 Output :ᅢ汇ǌࢀ甠瀼橪梸恕\u003cҰᡠ⢠ୀ\n\n  console.log(orbit.decode(data));\n```\n\u003e **⚠ Note: ⚠**    * You can do that : const orbit = require(\"orbit-encoder\"); And use orbit.OrbitEncoder.encode() everywhere but for a more clean approach I did the  code above.\n\n\n### ➤ Encode \u0026 Decode Data Passed on URI 🟢\nSometimes you may want to pass some heavy and complex data or datastructure in a URL, so you can use the `encodeWithURIsafe` method. It produces ASCII strings representing the original string encoded in Base64 with a few tweaks to make these URI safe. Hence, you can send them to the server without thinking about URL encoding them. \nThis saves bandwidth and CPU.\n\n- **ECMAScript Modules and Typescript** \n```typescript\n    import {OrbitEncoder} from 'orbit-encoder/lib/OrbitEncoder';\n\n    const data = [['2021-03-02','2021-06-02'],['2022-05-05','2021-07-01']];\n\n    // Then Encode whatever you want\n    const encodedData = OrbitEncoder.encodeWithURIsafe(data);\n\n    console.log(dataForURI);\n\n    /**\n     * 👇🏾 Output: 👇🏾\n     * \n     * OoRgzglgsgVgggTygZQAwHcoI1CBJMPGPTGAUQBcoARATSurwgA1kAPAIyJNjwYFUBEADIBhPEkZthAFTgBmWXDZ4ANiAAmQA\n     * \n     * /\n```\n```typescript\n    ...\n    const decodedData = OrbitEncoder.decodeURIsafe(encodedData);\n\n    console.log(decodedData);\n    /**\n     * 👇🏾 Output: 👇🏾\n     * \n     * [ [ '2021-03-02', '2021-06-02' ], [ '2022-05-05', '2021-07-01' ] ]\n     * \n     * /\n```\n- **CommonJs and Vanilla JS** \n```javascript\n  const orbit = require(\"orbit-encoder\").OrbitEncoder;\n\n\n  const dataForURI = orbit.encodeWithURIsafe([['2021-03-02','2021-06-02'],['2022-05-05','2021-07-01']]);\n\n  console.log(dataForURI) // 🚀 Output : OoRgzglgsgVgggTygZQAwHcoI1CBJMPGPTGAUQBcoARATSurwgA1kAPAIyJNjwYFUBEADIBhPEkZthAFTgBmWXDZ4ANiAAmQA\n  \n  console.log(orbit.decodeURIsafe(dataForURI))\n```\n\n___\n## Configuration Options\n\n*Coming Soon !*\n___\n## Contributing ❤\n\n👋🏾 Pull requests are welcome! \n___\n\n## Issue Reporting\n\nIf you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](mailto:support@orbitturner.com) details the procedure for disclosing security issues.\n___\n\n## GREETINGS\n\n\u003cp align=\"center\"\u003e\n❤❤\n\u003ca href=\"https://github.com/GalsenDev221/made.in.senegal\"\u003e\u003cimg src=\"https://github.com/GalsenDev221/made.in.senegal/raw/master/assets/badge.svg\"\u003e\u003c/a\u003e\n❤❤\n\u003c/p\u003e\n\n\n___\n## Author\n\n[Orbit Turner](https://orbitturner.com)\n\n___\n## License\n\nThis project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.\n______________________________________________________\n**❤ MADE WITH LOVE ❤**\n\n![Image of OT](https://raw.githubusercontent.com/orbitturner/orbitturner/master/LOGO-OT.png)\n\n\u003cimg src=\"https://github.com/orbitturner/challenger/blob/master/images/OrbitTurner_Gaming_GitHubBadge.png?raw=true\" align=\"right\" /\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitturner%2Forbit-encoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forbitturner%2Forbit-encoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitturner%2Forbit-encoder/lists"}