# bitcoin-blob
`bitcoin-blob` is a highly specialized Rust library designed to handle fixed-size, opaque byte arrays known as blobs. It provides extensive functionality for iterating, serializing, deserializing, hex encoding/decoding, and more.
## Features
- **Flexible Blob Definitions:** Define blobs of arbitrary bit/byte sizes using powerful macros.
- **Iterators:** Seamlessly iterate over blob data in mutable and immutable forms.
- **Serialization:** Robust functionality to serialize blobs to and from streams.
- **Hex Utilities:** Convert blobs to hexadecimal strings and vice versa.
- **Typical Operations:** Includes utility methods for checking if blobs are null, comparing blobs, and basic byte-level manipulations.
- **Deterministic RNG:** Includes a simple RNG for deterministic testing purposes.
## Usage
Below is an example of how to define and use a 256-bit blob:
```rust
#[macro_use]
extern crate bitcoin_blob;
base_blob!(BaseBlob256, 256, 32);
fn main() {
let mut blob = BaseBlob256::zero();
blob.set_hex_from_str("abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890");
println!("Hex: {}", blob.to_string());
}
```
For comprehensive examples and detailed information on each macro, refer to the [documentation](https://github.com/klebs6/bitcoin-rs).
## License
`bitcoin-blob` is licensed under the MIT License.
---
*Disclaimer: This README.md was generated by an AI model and may not be 100% accurate; however, it should be pretty good.*