{"id":17224160,"url":"https://github.com/devnied/bit-lib4j","last_synced_at":"2026-02-08T02:30:24.837Z","repository":{"id":71054315,"uuid":"8321878","full_name":"devnied/Bit-lib4j","owner":"devnied","description":"Useful library to handle bytes or bits in Java. Read and write data in a byte array with a custom size for Java types. Read/Write Integer, Long, signed data, String, Hexa String and Date bit to bit","archived":false,"fork":false,"pushed_at":"2021-12-21T21:35:33.000Z","size":293,"stargazers_count":58,"open_issues_count":1,"forks_count":28,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-27T14:51:58.002Z","etag":null,"topics":["bit-lib4j","bits","bitset","byte-array","java","java-library"],"latest_commit_sha":null,"homepage":"https://github.com/devnied/Bit-lib4j","language":"Java","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/devnied.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2013-02-20T20:50:00.000Z","updated_at":"2025-02-27T20:26:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d9ab10d-76bc-4f62-8535-ca12590b37b3","html_url":"https://github.com/devnied/Bit-lib4j","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnied%2FBit-lib4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnied%2FBit-lib4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnied%2FBit-lib4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnied%2FBit-lib4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devnied","download_url":"https://codeload.github.com/devnied/Bit-lib4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248803018,"owners_count":21163968,"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":["bit-lib4j","bits","bitset","byte-array","java","java-library"],"created_at":"2024-10-15T04:10:23.670Z","updated_at":"2026-02-08T02:30:24.830Z","avatar_url":"https://github.com/devnied.png","language":"Java","readme":"Bit-lib4j ![Bit-lib4j CI](https://github.com/devnied/Bit-lib4j/workflows/Bit-lib4j%20CI/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/devnied/Bit-lib4j/badge.svg?branch=master)](https://coveralls.io/github/devnied/Bit-lib4j?branch=master)\n========\n\nBit-Lib4j is an useful library to handle bytes or bits in Java.\u003cbr/\u003e\nWith this library you can read/write data in a byte array with a custom size for Java primitive types.\n\n## Simple API\n\nIt is very easy to get started with bit-lib4j:\n\n* Read data from byte array\n\n```java\n\tbyte[] array = new byte[]{0x12,0x25}\n\tBitUtils bit = new BitUtils(array);\n\tint res = bit.getNextInteger(4);        // read the first 4 bits to an integer\n```\n\n* Create byte array with bit\n\n```java\n\tBitUtils bit = new BitUtils(8);\n\tbit.setNextInteger(3,3);        // set an integer on 3 bits\n\tbit.setNextInteger(1,5);        // set one value on 5 bits\n\n\t// Result\n\tbit.getData();                  // return Ox61  (0110 0001b)\n```\n\n* Read/write signed values\n\n```java\n\tBitUtils bit = new BitUtils(4);\n\tbit.setNextInteger(-2 , 4);\t    // set an integer (-2) on 4 bits\n\n\t// Result\n\tbit.getNextIntegerSigned(4);    // return -2\n```\nYou can also use ```getNextLongSigned()``` to handle long signed values.\n\n\n## Handle bytes more easily\n\nThe class ByteUtils provided static methods to convert byte array to String, String to byte array, int to byte array, byte array to binary representation.\n\n\nMore documentation into the [wiki](https://github.com/devnied/Bit-lib4j/wiki)\n\n## Download\n\n### Maven\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.devnied\u003c/groupId\u003e\n  \u003cartifactId\u003ebit-lib4j\u003c/artifactId\u003e\n  \u003cversion\u003e1.6.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### JAR\n\nYou can download this library on [Maven central](http://search.maven.org/#search%7Cga%7C1%7Cbit-lib4j) or in Github [release tab](https://github.com/devnied/Bit-lib4j/releases)\n\n## Dependencies\n\nIf you are not using Maven or some other dependency management tool that can understand Maven repositories, the list below is what you need to run bit-lib4j.\n\n**Runtime Dependencies**\n* slf4j-api 1.7.36\n\n## Bugs\n\nPlease report bugs and feature requests to the GitHub issue tracker.\u003cbr/\u003e\nForks and Pull Requests are also welcome.\n\n## Author\n\n**Millau Julien**\n\n+ [http://x.com/devnied](http://x.com/devnied)\n+ [http://github.com/devnied](http://github.com/devnied)\n\n\n## Copyright and license\n\nCopyright 2026 Millau Julien.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this work except in compliance with the License.\nYou may obtain a copy of the License in the LICENSE file, or at:\n\n  [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevnied%2Fbit-lib4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevnied%2Fbit-lib4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevnied%2Fbit-lib4j/lists"}