binrange 1.0.3
Utility functions to parse/emit ranges of bytes.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
What's this?
binrange is a library to parse and emit over ranges of ubyte
.
It's an alternative to std.bitmanip.read
and std.bitmanip.write
.
It also support RIFF headers.
Licenses
See UNLICENSE.txt
Usage
import binrange;
void main()
{
ubyte[] input = [ 0x00, 0x01, 0x02, 0x03 ];
// read one uint encoded in little endian from a range
assert(popLE!uint(input) == 0x03020100);
// write one float encoded in big-endian into an output range
import std.array;
ubyte[] arr;
auto app = appender(arr);
writeBE!float(app, 1.2f);
}
- 1.0.3 released 6 years ago
- p0nce/binrange
- github.com/p0nce/binrange/
- public domain
- Authors:
- Dependencies:
- none
- Versions:
-
1.0.3 2018-Jan-20 1.0.2 2015-Jul-29 1.0.1 2015-Jul-10 1.0.0 2015-May-19 0.0.2 2015-Feb-21 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
1 downloads this month
-
2278 downloads total
-
- Score:
- 1.2
- Short URL:
- binrange.dub.pm