Added readme
This commit is contained in:
parent
b57d85c68b
commit
9750f6deb7
20
README.md
Normal file
20
README.md
Normal file
@ -0,0 +1,20 @@
|
||||
## Binary Editor
|
||||
|
||||
This is a very simple c library for reading and writing individual bits.
|
||||
|
||||
#### Usage:
|
||||
|
||||
First, you should initialize the input and output buffers with
|
||||
|
||||
```
|
||||
setBuffer(BUF_IN, bufferToRead)
|
||||
setBuffer(BUF_OUT, bufferToWrite);
|
||||
```
|
||||
|
||||
From here, you can read individual bits with `readBit()` or a whole byte with readByte(). For writing, use `writeBit()` and `writeByte()`.
|
||||
|
||||
**Note**: The way writing works, it will not override something already in the buffer, instead only messing up data. Make sure to initialize your buffers to 0 for writing to work correctly.
|
||||
|
||||
If you want to go back to a different part of a buffer, you can seek with
|
||||
|
||||
`seekBuffer(BUF_IN or BUF_OUT, numInBits)`You can also get the current bit offest with `getBufferOffset(BUF_IN or BUF_OUT)`
|
Loading…
x
Reference in New Issue
Block a user