semvec/pypi-packages huggingface dataset:
python-datastream 0.1.0
Read and write not only bytes in python (like DataStream in java)
Requires Python: >=3.6


# datastream

Read and write binary files by integer, floats, strings with fixed size.

## Installing

```shell
pip install python-datastream
```

## Usage

Reading:
```python
from datastream import DataInputStream

with open("test.bin", "rb") as f:
    ds = DataInputStream(f)
    print(ds.read_int())
    print(ds.read_strz())
```

Writing:
```python
from datastream import DataOutputStream

with open("test.bin", "wb") as f:
    ds = DataOutputStream(f)
    ds.write_int(42)
    ds.write_strz("Hello world")
```

## License

MIT License. See LICENSE file.