From 9750f6deb737089dcd08f169626bf002439e8110 Mon Sep 17 00:00:00 2001 From: nolan Date: Fri, 19 Sep 2025 20:49:11 -0400 Subject: [PATCH] Added readme --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..babfb15 --- /dev/null +++ b/README.md @@ -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)`