https://github.com/ziman/idris-bytes
FFI-based byte buffers for Idris
https://github.com/ziman/idris-bytes
Last synced: 4 months ago
JSON representation
FFI-based byte buffers for Idris
- Host: GitHub
- URL: https://github.com/ziman/idris-bytes
- Owner: ziman
- Created: 2015-03-16T16:26:10.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2019-06-21T18:55:45.000Z (almost 7 years ago)
- Last Synced: 2025-02-01T08:15:19.322Z (over 1 year ago)
- Language: Idris
- Size: 39.1 KB
- Stars: 10
- Watchers: 3
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# idris-bytes
A FFI-based implementation of byte buffers for Idris.
* This is a snoc-based structure (designed to grow to the right).
* Reading is unrestricted -- we provide `consView`, as well as `snocView`,
subslicing and arbitrary indexing, all in O(1).
* Copying is avoided wherever possible (copy-on-second-write) --
snocs and appends will not copy the LHS argument unless necessary.
Instead, data is destructively written into pre-allocated spare space,
as long as it is safe.
* Built on top of `Data.ByteArray`, `IO`-based mutable byte arrays.
This is the binary backend for [idris-text](https://github.com/ziman/text).
## Installation
```bash
$ idris --build bytes.ipkg
$ idris --install bytes.ipkg
```