{"id":25402235,"url":"https://github.com/st1vms/dynamic-bits","last_synced_at":"2026-05-05T12:31:32.982Z","repository":{"id":164087641,"uuid":"594807469","full_name":"st1vms/dynamic-bits","owner":"st1vms","description":"Fast de/serialization library supporting variable-bits arrangement","archived":false,"fork":false,"pushed_at":"2024-10-09T12:35:08.000Z","size":324,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T12:59:24.248Z","etag":null,"topics":["android","boolean-bits","c","compression","deserialization","embedded","fast","ieee-754","iot","java","marshalling","networking","packet","serialization","serialization-library","utf8-string","varints"],"latest_commit_sha":null,"homepage":"","language":"C","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/st1vms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.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,"zenodo":null},"funding":{"custom":["https://www.buymeacoffee.com/st1vms"]}},"created_at":"2023-01-29T17:47:16.000Z","updated_at":"2024-10-09T12:34:57.000Z","dependencies_parsed_at":"2025-04-12T11:45:00.245Z","dependency_job_id":null,"html_url":"https://github.com/st1vms/dynamic-bits","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/st1vms/dynamic-bits","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st1vms%2Fdynamic-bits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st1vms%2Fdynamic-bits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st1vms%2Fdynamic-bits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st1vms%2Fdynamic-bits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/st1vms","download_url":"https://codeload.github.com/st1vms/dynamic-bits/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st1vms%2Fdynamic-bits/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32649515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["android","boolean-bits","c","compression","deserialization","embedded","fast","ieee-754","iot","java","marshalling","networking","packet","serialization","serialization-library","utf8-string","varints"],"created_at":"2025-02-16T01:33:11.601Z","updated_at":"2026-05-05T12:31:32.970Z","avatar_url":"https://github.com/st1vms.png","language":"C","funding_links":["https://www.buymeacoffee.com/st1vms","https://img.buymeacoffee.com/button-api/?text=1"],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://www.buymeacoffee.com/st1vms\"\u003e\u003cimg src=\"https://img.buymeacoffee.com/button-api/?text=1 Pizza Margherita\u0026emoji=🍕\u0026slug=st1vms\u0026button_colour=0fa913\u0026font_colour=ffffff\u0026font_family=Bree\u0026outline_colour=ffffff\u0026coffee_colour=FFDD00\" /\u003e\u003c/a\u003e\n# dynamic-bits\n\n\n## Table of content\n\n- [Overview](#overview)\n- [Linux Installation](#linux-installation)\n    - [Installing on Linux (Cmake)](#installing-on-linux-cmake)\n- [Android Installation](#manual-android-installation)\n- [Uninstalling](#uninstalling)\n- [Usage](#usage)\n- [Notes](#notes)\n\n\n# Overview\n\nThis is a serialization library that supports **variable length integers/doubles**, **UTF8 strings** and serialization of **boolean bits**.\nThis library is designed to be **strong**, **lightweight** and **fast**, using (one-malloc) allocation strategy and minimizing the amount of resources during serialization/deserialization.\n\nThis library uses variable-length integers, trying to serialize the minimum amount of bits required for each data type, prepending a bit header representing the bit size of the data. It follows IEEE 754 for 64-bit double precision, is UTF8 string compatible, and allows boolean serialization using only one bit.\n\nEach \"packet\" is defined in a packet table, a fixed number of fields is assigned to every packet, along with an unsigned 8-bit integer representing the packet-id.\n\nProgrammers must register their packets in the table before any de/serialization activity, this way thread safety can be achieved.\n\n\n# Linux-Installation\n\n## Requirements\n## Requirements\n\n- [cmake](https://cmake.org/install/) is required in order to build this library.\n- Download this repository, either by zip or git using:\n    ```\n    git clone https://github.com/st1vms/dynamic-bits\n    ```\n\n## Before building\n_____________________________________\nEnsure to set optimal value for `MAX_PACKET_FIELDS` macro. It is located in the first lines of [include/dpacket.h](include/dpacket.h)\n\n***MAX_PACKET_FIELDS** -\u003e Max number of fields a packet can hold.*\n\nIt is drastically important to tweak this value in order to optimize space required for building the static packet table,\n\n\n*PacketTableByteSize = 255 * (MAX_PACKET_FIELDS) bytes*\n\n## Installing-On-Linux-CMake\n\nAfter configuration is done, open a terminal inside the repository directory, and execute these commands.\n```\nchmod u+x ./build.sh\n./build.sh \u0026\u0026 sudo make install -C build/\n```\n\nInside the build folder you will find the generated shared library.\n\nThe library will be already installed on your system...\n\n# Manual-Android-Installation\n\n- Install [Android Studio](https://cmake.org/install/) if not already installed.\n- Open the JDBits bind project inside Android Studio\n\n## Before Building ( Android )\n_____________________________________\nEnsure to set optimal value for `MAX_PACKET_FIELDS` macro. It is located in the first lines of [jdbits/src/main/cpp/include/dpacket.h](binds/Android/JDBits/jdbits/src/main/cpp/include/dpacket.h)\n\n***MAX_PACKET_FIELDS** -\u003e Max number of fields a packet can hold.*\n\nIt is drastically important to tweak this value in order to optimize space required for building the static packet table.\n\n\n*PacketTableByteSize = 255 * (MAX_PACKET_FIELDS) bytes*\n\n## Building AAR library in Android Studio\n\n- After syncing gradle files, open a terminal and execute this command:\n    ```\n    JAVA_HOME=$HOME/android-studio/jbr ./gradlew jdbits:assemble\n    ```\n\nYou will find the generated **jdbits-\u003cbuild_version\u003e.aar** file inside the `build/outputs/aar` folder\n\nCopy the AAR file into your Android project **`libs`** folder, and import is as an **`implementation`** dependency, using the Android Studio dependency manager in your Project Settings.\n\n\n## Usage\n\nPlease refer to the examples provided in the [examples](examples/) folder, for the specific language/platform you're using...\n\n- [C-Example](examples/c-example/)\n- [Android-Java-Example](examples/android-example/app/src/main/java/com/example/dbitsandroidexample/MainActivity.java)\n\n\n## Notes\n\nThis library doesn't still support complex structures, such as arrays, unions, dictonaries, etc...\n\nI'm planning to add them very soon along with bindings for Python and Java.\n\n\n## Uninstalling\n\nRun these two commands inside project folder...\n```\nchmod u+x uninstall.sh\nsudo ./uninstall.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fst1vms%2Fdynamic-bits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fst1vms%2Fdynamic-bits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fst1vms%2Fdynamic-bits/lists"}