https://github.com/aweirddev/lize
A stupid way of serializing and deserializing data into bytes that supports recursive data structures.
https://github.com/aweirddev/lize
deserialization serde serialization
Last synced: about 1 year ago
JSON representation
A stupid way of serializing and deserializing data into bytes that supports recursive data structures.
- Host: GitHub
- URL: https://github.com/aweirddev/lize
- Owner: AWeirdDev
- License: mit
- Created: 2025-01-28T16:00:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-01T12:09:59.000Z (over 1 year ago)
- Last Synced: 2025-04-01T07:45:54.407Z (about 1 year ago)
- Topics: deserialization, serde, serialization
- Language: Rust
- Homepage: https://crates.io/crates/lize
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lize
Serialize/deserialize data into bytes. Designed for **really** small data.
- **[🦀 Rust `lize`](https://github.com/AWeirdDev/lize/tree/main/lize)**
- [🐍 Python](https://github.com/AWeirdDev/lize)
- [🟡 PyPi](https://pypi.org/project/lize/)
## Python
```python
from lize import deserialize, serialize
# You can serialize numbers, strings and more.
s = serialize(["Hello, World!", 100, 3.14, {"python": "cool"}])
# ..and then deserialize it
d: list = deserialize(s)
```
Additionally, you can also serialize and deserialize **functions**. Again, small functions.
```python
from typing import Callable
def add(a: int, b: int, k: float) -> float:
return (a + b) * k
s = serialize(add)
d: Callable[[int, int, float], int] = deserialize(s)
print(d)
# Runnable( add(...) -> ?)
```