Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devmanu-de/xbinary
xbinary contains useful functions when working with raw binary data.
https://github.com/devmanu-de/xbinary
Last synced: about 1 month ago
JSON representation
xbinary contains useful functions when working with raw binary data.
- Host: GitHub
- URL: https://github.com/devmanu-de/xbinary
- Owner: DevManu-de
- License: mit
- Created: 2021-07-23T13:21:04.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-27T20:52:14.000Z (about 3 years ago)
- Last Synced: 2023-07-23T22:21:53.115Z (over 1 year ago)
- Language: C
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xbinary
## Description
xbinary contains useful functions when working with raw binary data.## Usage
xbinary is equipped with a makefile that allows you to generate a `.a` file.
To do so just type `make` in the root directory of the project.
The `.a` file will be dropped to the root of the project.
All you have to do now is to copy `include/xbinary.h` and `libxbinary.a` to your project and you are good to go. (I assume you know how to link it)## rotl()
> 1. Argument is the number to be shifted left
> 2. Argument is the amount the number should be shifted left
>## rotr()
> 1. Argument is the number to be shifted right
> 2. Argument is the amount the number should be shifted right
>## HIGHESTBIT()
> 1. Argument is the data type of which the highest bit should be given (unsigned)
>## print_bin()
> 1. Argument is the number to be printed as binary to stdout
>## fprint_bin()
> 1. Argument is the file the number should be printed to in binary
> 2. Argument is the number
>## sprint_bin()
> 1. Argument is the stream the number should be printed to in binary
> 2. Argument is the number
>