Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taylorfinnell/io-binary
Bit level IO for Crystal
https://github.com/taylorfinnell/io-binary
Last synced: 11 days ago
JSON representation
Bit level IO for Crystal
- Host: GitHub
- URL: https://github.com/taylorfinnell/io-binary
- Owner: taylorfinnell
- License: mit
- Created: 2017-08-23T21:57:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-23T22:15:54.000Z (over 7 years ago)
- Last Synced: 2024-10-25T02:04:39.913Z (about 2 months ago)
- Language: Crystal
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# io-binary
[![CircleCI](https://circleci.com/gh/taylorfinnell/io-binary.svg?style=svg)](https://circleci.com/gh/taylorfinnell/io-binary)An IO implementation that supports bit level reading.
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
io-binary:
github: taylorfinnell/io-binary
```## Usage
`require "io-binary"`
```crystal
io = IO::Binary.new(Bytes.new(1, 3.to_u8)) # single byte of value 3io.read_bit # => 1
io.read_bit # => 1
io.read_bit # => 0
```## Limits
Does not implement `IO#write`.