Skip to content

jinahya/bit-io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

989 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bit-io

GitHub Action Quality Gate Status Maven Central javadoc

A small zero-dependency Java library for bit-level I/O, with retro-translated artifacts for legacy JVMs.

bit-io reads and writes values that are not aligned to octet boundaries, such as a 1-bit boolean, a 6-bit unsigned int, or a 47-bit signed long.

final BitOutput output = new DefaultBitOutput(new StreamByteOutput(out));
output.writeBoolean(true);
output.writeInt(true, 6, 42);
output.writeLong(false, 47, -1L);
output.align(1);

Install

<dependency>
  <groupId>io.github.jinahya</groupId>
  <artifactId>bit-io</artifactId>
  <version>${bit-io.version}</version>
</dependency>

Use the Maven Central page for the latest released version.

Retro-translated artifacts are also published for legacy JVMs:

<dependency>
  <groupId>io.github.jinahya</groupId>
  <artifactId>bit-io</artifactId>
  <version>${bit-io.version}</version>
  <classifier>retrotranslated13</classifier>
</dependency>
<dependency>
  <groupId>io.github.jinahya</groupId>
  <artifactId>bit-io</artifactId>
  <version>${bit-io.version}</version>
  <classifier>retrotranslated14</classifier>
</dependency>

Documentation

Guides, examples, and design notes are maintained in the GitHub wiki.

API reference: javadoc.io/doc/io.github.jinahya/bit-io

Notes

  • Runtime target: Java 1.6.
  • Retro-translated artifacts are published with retrotranslated13 and retrotranslated14 classifiers.
  • License: Apache License 2.0.

About

A library for reading/writing arbitrary length of bits.

Topics

Resources

Stars

Watchers

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages